changeset 60188:aab64283d00a legacy-trunk

Fix test_compiler.py that was using unittest.__file__ to find Lib/ (unittest is now a package).
author Ezio Melotti <ezio.melotti@gmail.com>
date Fri, 02 Apr 2010 21:43:10 +0000
parents 70b7e4a7f7ce
children 84ecb35a06bd
files Lib/test/test_compiler.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/test/test_compiler.py	Fri Apr 02 21:42:47 2010 +0000
+++ b/Lib/test/test_compiler.py	Fri Apr 02 21:43:10 2010 +0000
@@ -23,7 +23,9 @@
         # 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]: