Kaydet (Commit) 6d2bb7f5 authored tarafından Brett Cannon's avatar Brett Cannon

Move a test-skipping decorator over to unittest.skipIf.

üst 0f46ffdb
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):
......
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