mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +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
|
|
@ -55,7 +55,7 @@ def test_package_import__semantics(self):
|
|||
except SyntaxError: pass
|
||||
else: raise RuntimeError('Failed to induce SyntaxError') # self.fail()?
|
||||
self.assertNotIn(self.module_name, sys.modules)
|
||||
self.assertFalse(hasattr(sys.modules[self.package_name], 'foo'))
|
||||
self.assertNotHasAttr(sys.modules[self.package_name], 'foo')
|
||||
|
||||
# ...make up a variable name that isn't bound in __builtins__
|
||||
var = 'a'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue