mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix the importlib_only test decorator to work again; don't capture the flag variable as it might change later.
This commit is contained in:
parent
a6503606f9
commit
44b28a9f32
1 changed files with 3 additions and 1 deletions
|
@ -15,7 +15,9 @@ def import_(*args, **kwargs):
|
|||
return importlib.__import__(*args, **kwargs)
|
||||
|
||||
|
||||
importlib_only = unittest.skipIf(using___import__, "importlib-specific test")
|
||||
def importlib_only(fxn):
|
||||
"""Decorator to skip a test if using __builtins__.__import__."""
|
||||
return unittest.skipIf(using___import__, "importlib-specific test")(fxn)
|
||||
|
||||
|
||||
def mock_path_hook(*entries, importer):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue