summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/test/import_/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/importlib/test/import_/util.py b/Lib/importlib/test/import_/util.py
index 6b0e9d1..649c5ed 100644
--- a/Lib/importlib/test/import_/util.py
+++ b/Lib/importlib/test/import_/util.py
@@ -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):