Skip to content

Commit

Permalink
TEST: Use TestCase.assert* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Feb 1, 2024
1 parent d7a16ff commit dded16c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/test/test_importlib/test_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_module_load_race(self):
with test_util.uncache(TestingImporter.module_name):
loader = TestingImporter()
module = self.new_module(loader=loader)
assert loader.load_count == 0
self.assertEqual(loader.load_count, 0)

class RaisingThread(threading.Thread):
exc = None
Expand All @@ -171,10 +171,10 @@ def access_module():
# Races could cause errors
for thread in threads:
thread.join()
assert thread.exc is None
self.assertIsNone(thread.exc)

# Or multiple load attempts
assert loader.load_count == 1
self.assertEqual(loader.load_count, 1)


if __name__ == '__main__':
Expand Down

0 comments on commit dded16c

Please sign in to comment.