mirror of
https://github.com/python/cpython.git
synced 2025-11-07 09:02:02 +00:00
[3.13] gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052) (#129123)
(cherry picked from commit f7cc7d296c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
d2ec87f740
commit
a9bb0092d0
19 changed files with 68 additions and 64 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue