Factor out helper code from importlib.test.extension.test_path_hook.

This commit is contained in:
Brett Cannon 2009-02-07 02:06:43 +00:00
parent 36d1f3eb41
commit 534b2cd176
6 changed files with 21 additions and 42 deletions

View file

@ -2,6 +2,7 @@ from contextlib import contextmanager
import imp
import os.path
from test.support import unlink
import unittest
import sys
@ -9,7 +10,7 @@ def case_insensitive_tests(class_):
"""Class decorator that nullifies tests that require a case-insensitive
file system."""
if sys.platform not in ('win32', 'darwin', 'cygwin'):
return object()
return unittest.TestCase
else:
return class_