diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-07-29 07:52:21 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-07-29 07:52:21 (GMT) |
commit | 00dc61cd73813433b5295555382e489151bfced9 (patch) | |
tree | 18393747f1157ed3b32fe79a492aa1cfbb080c30 | |
parent | 4bcb1ec539f2a45ccf2ed5d930a69f73938229cd (diff) | |
parent | c06c0aed58db0f223e91607485de8a9fe77c3e7e (diff) | |
download | cpython-00dc61cd73813433b5295555382e489151bfced9.zip cpython-00dc61cd73813433b5295555382e489151bfced9.tar.gz cpython-00dc61cd73813433b5295555382e489151bfced9.tar.bz2 |
Merge #15415 from 3.3 (again)
-rw-r--r-- | Lib/test/test_startfile.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_startfile.py b/Lib/test/test_startfile.py index 68e35b3..43abf9b 100644 --- a/Lib/test/test_startfile.py +++ b/Lib/test/test_startfile.py @@ -21,12 +21,14 @@ class TestCase(unittest.TestCase): self.assertRaises(OSError, startfile, "nonexisting.vbs") def test_empty(self): - # startfile is a little odd when it comes to handling absolute - # paths, so we briefly switch to the main test directory - # and use a relative path - with support.change_cwd(support.TEST_HOME): - empty = "empty.vbs" + # We need to make sure the child process starts in a directory + # we're not about to delete. If we're running under -j, that + # means the test harness provided directory isn't a safe option. + # See http://bugs.python.org/issue15526 for more details + with support.change_cwd(path.dirname(sys.executable)): + empty = path.join(path.dirname(__file__), "empty.vbs") startfile(empty) + startfile(empty, "open") def test_main(): support.run_unittest(TestCase) |