gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052)

This commit is contained in:
Serhiy Storchaka 2025-01-21 11:24:19 +02:00 committed by GitHub
parent da310d209a
commit f7cc7d296c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 51 additions and 54 deletions

View file

@ -15,12 +15,12 @@ def path_hook(self):
def test_success(self):
with util.create_modules('dummy') as mapping:
self.assertTrue(hasattr(self.path_hook()(mapping['.root']),
'find_spec'))
self.assertHasAttr(self.path_hook()(mapping['.root']),
'find_spec')
def test_empty_string(self):
# The empty string represents the cwd.
self.assertTrue(hasattr(self.path_hook()(''), 'find_spec'))
self.assertHasAttr(self.path_hook()(''), 'find_spec')
(Frozen_PathHookTest,