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:
Brett Cannon 2009-08-30 18:59:21 +00:00
parent a6503606f9
commit 44b28a9f32

View file

@ -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):