Fix test_compiler.py that was using unittest.__file__ to find Lib/ (unittest is now a package).

This commit is contained in:
Ezio Melotti 2010-04-02 21:43:10 +00:00
parent 5637f04a94
commit 7999deafc8
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ class CompilerTest(unittest.TestCase):
# to generate some kind of code for it. # to generate some kind of code for it.
next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL
libdir = os.path.dirname(unittest.__file__) # warning: if 'os' or 'test_support' are moved in some other dir,
# they should be changed here.
libdir = os.path.dirname(os.__file__)
testdir = os.path.dirname(test.test_support.__file__) testdir = os.path.dirname(test.test_support.__file__)
for dir in [libdir, testdir]: for dir in [libdir, testdir]: