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
@ -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…
x
Reference in New Issue
Block a user