summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-08-27 23:44:18 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-08-27 23:44:18 (GMT)
commit6d2bb7f5aa17acac28737235959ec4ec852d833d (patch)
treee74ba8c4714b79f29ce62773fc2c616506317714 /Lib/importlib
parent0f46ffdbbc72f9adfa76093345145f92e782d240 (diff)
downloadcpython-6d2bb7f5aa17acac28737235959ec4ec852d833d.zip
cpython-6d2bb7f5aa17acac28737235959ec4ec852d833d.tar.gz
cpython-6d2bb7f5aa17acac28737235959ec4ec852d833d.tar.bz2
Move a test-skipping decorator over to unittest.skipIf.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/test/import_/util.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/Lib/importlib/test/import_/util.py b/Lib/importlib/test/import_/util.py
index 5a1b727..214bc9e 100644
--- a/Lib/importlib/test/import_/util.py
+++ b/Lib/importlib/test/import_/util.py
@@ -1,5 +1,7 @@
import functools
+import importlib
import importlib._bootstrap
+import unittest
using___import__ = False
@@ -13,16 +15,7 @@ def import_(*args, **kwargs):
return importlib._bootstrap.__import__(*args, **kwargs)
-def importlib_only(fxn):
- """Decorator to mark which tests are not supported by the current
- implementation of __import__()."""
- def inner(*args, **kwargs):
- if using___import__:
- return
- else:
- return fxn(*args, **kwargs)
- functools.update_wrapper(inner, fxn)
- return inner
+importlib_only = unittest.skipIf(using___import__, "importlib-specific test")
def mock_path_hook(*entries, importer):