[Python-checkins] cpython (3.3): Third attempt to fix #15415 on Windows
nick.coghlan
python-checkins at python.org
Mon Jul 29 09:52:49 CEST 2013
http://hg.python.org/cpython/rev/403b038ff075
changeset: 84896:403b038ff075
branch: 3.3
parent: 84894:a76693942de3
user: Nick Coghlan <ncoghlan at gmail.com>
date: Mon Jul 29 17:51:16 2013 +1000
summary:
Third attempt to fix #15415 on Windows
With help from jkloth on IRC, so it will hopefully work
this time :)
files:
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
--- a/Lib/test/test_startfile.py
+++ b/Lib/test/test_startfile.py
@@ -21,12 +21,14 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list