Tests of case-sensitivity were being executed on OSs which did not have a

case-insensitive file system, leading to test failures. This was due to using
the TestCase objects directly instead of the guard in the test_main() function.
Move over to a class decorator instead to control if the tests should be run.
This commit is contained in:
Brett Cannon 2009-01-18 06:55:05 +00:00
parent b0516a6bc6
commit 2c5c79cfc4
3 changed files with 13 additions and 4 deletions

View file

@ -36,6 +36,16 @@ def writes_bytecode(fxn):
else:
return fxn
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()
else:
return class_
@contextmanager
def uncache(*names):
"""Uncache a module from sys.modules.