Kaydet (Commit) 44b28a9f authored tarafından Brett Cannon's avatar Brett Cannon

Fix the importlib_only test decorator to work again; don't capture the flag…

Fix the importlib_only test decorator to work again; don't capture the flag variable as it might change later.
üst a6503606
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment