diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-07-09 15:35:33 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-07-09 15:35:33 (GMT) |
commit | 573399a2f621f6940c25579098e1d8d02d0918b9 (patch) | |
tree | 27c3540f3a274346e86723e8443ce9943c01e628 /Lib/test/test_import.py | |
parent | fbf2cc4d7467a489ef8948f7461c9f30c900eee5 (diff) | |
download | cpython-573399a2f621f6940c25579098e1d8d02d0918b9.zip cpython-573399a2f621f6940c25579098e1d8d02d0918b9.tar.gz cpython-573399a2f621f6940c25579098e1d8d02d0918b9.tar.bz2 |
Curdir needs to be in the path for the test to work on all buildbots.
(I copied this from another import test, but currently this will fail if
TESTFN ends up in /tmp...see issue 2609).
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 64cc314..80ac60d 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -98,6 +98,7 @@ class ImportTest(unittest.TestCase): # Issue 6070: under posix .pyc files got their execute bit set if # the .py file had the execute bit set, but they aren't executable. oldmask = os.umask(022) + sys.path.insert(0, os.curdir) try: fname = TESTFN + os.extsep + "py" f = open(fname, 'w').close() @@ -116,6 +117,7 @@ class ImportTest(unittest.TestCase): os.umask(oldmask) remove_files(TESTFN) if TESTFN in sys.modules: del sys.modules[TESTFN] + del sys.path[0] def testImpModule(self): # Verify that the imp module can correctly load and find .py files |