]> granicus.if.org Git - python/commitdiff
Fix test_compiler.py that was using unittest.__file__ to find Lib/ (unittest is now...
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 2 Apr 2010 21:43:10 +0000 (21:43 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 2 Apr 2010 21:43:10 +0000 (21:43 +0000)
Lib/test/test_compiler.py

index c257f0207ced4df9fb2a30b2a9aad3e87ec62cd4..6394b53a0cf8262ac558f0831e4dde77a132b80c 100644 (file)
@@ -23,7 +23,9 @@ class CompilerTest(unittest.TestCase):
         # to generate some kind of code for it.
 
         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__)
 
         for dir in [libdir, testdir]: