mirror of
https://github.com/python/cpython.git
synced 2025-10-30 05:01:30 +00:00
gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052)
This commit is contained in:
parent
da310d209a
commit
f7cc7d296c
18 changed files with 51 additions and 54 deletions
|
|
@ -125,12 +125,12 @@ def test_delete_eventual_attr(self):
|
|||
# Deleting an attribute should stay deleted.
|
||||
module = self.new_module()
|
||||
del module.attr
|
||||
self.assertFalse(hasattr(module, 'attr'))
|
||||
self.assertNotHasAttr(module, 'attr')
|
||||
|
||||
def test_delete_preexisting_attr(self):
|
||||
module = self.new_module()
|
||||
del module.__name__
|
||||
self.assertFalse(hasattr(module, '__name__'))
|
||||
self.assertNotHasAttr(module, '__name__')
|
||||
|
||||
def test_module_substitution_error(self):
|
||||
with test_util.uncache(TestingImporter.module_name):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue