diff options
author | Raymond Hettinger <python@rcn.com> | 2017-01-08 04:53:09 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2017-01-08 04:53:09 (GMT) |
commit | 5eed36fab4d12016e69350918ca1e59c3aa27523 (patch) | |
tree | 83c2c04055acb47314a527da95c6ea46478f4b88 | |
parent | d191ef25c11f2e4d6a8c27f246ca18c6ff05997e (diff) | |
download | cpython-5eed36fab4d12016e69350918ca1e59c3aa27523.zip cpython-5eed36fab4d12016e69350918ca1e59c3aa27523.tar.gz cpython-5eed36fab4d12016e69350918ca1e59c3aa27523.tar.bz2 |
Issue #29200: Fix test to use self.assertEqual instead of py.test style tests
-rw-r--r-- | Lib/test/test_functools.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 535b353..ae0d9f7 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -1207,24 +1207,24 @@ class TestLRU: mock_int.__hash__ = unittest.mock.Mock(return_value=999) # Add to cache: One use as an argument gives one call - assert f(mock_int, 1) == 16 - assert mock_int.__hash__.call_count == 1 - assert f.cache_info() == (0, 1, 1, 1) + self.assertEqual(f(mock_int, 1), 16) + self.assertEqual(mock_int.__hash__.call_count, 1) + self.assertEqual(f.cache_info(), (0, 1, 1, 1)) # Cache hit: One use as an argument gives one additional call - assert f(mock_int, 1) == 16 - assert mock_int.__hash__.call_count == 2 - assert f.cache_info() == (1, 1, 1, 1) + self.assertEqual(f(mock_int, 1), 16) + self.assertEqual(mock_int.__hash__.call_count, 2) + self.assertEqual(f.cache_info(), (1, 1, 1, 1)) # Cache eviction: No use as an argument gives no additonal call - assert f(6, 2) == 20 - assert mock_int.__hash__.call_count == 2 - assert f.cache_info() == (1, 2, 1, 1) + self.assertEqual(f(6, 2), 20) + self.assertEqual(mock_int.__hash__.call_count, 2) + self.assertEqual(f.cache_info(), (1, 2, 1, 1)) # Cache miss: One use as an argument gives one additional call - assert f(mock_int, 1) == 16 - assert mock_int.__hash__.call_count == 3 - assert f.cache_info() == (1, 3, 1, 1) + self.assertEqual(f(mock_int, 1), 16) + self.assertEqual(mock_int.__hash__.call_count, 3) + self.assertEqual(f.cache_info(), (1, 3, 1, 1)) def test_lru_reentrancy_with_len(self): # Test to make sure the LRU cache code isn't thrown-off by |