File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,12 +21,14 @@ def test_nonexisting(self):
2121 self .assertRaises (OSError , startfile , "nonexisting.vbs" )
2222
2323 def test_empty (self ):
24- # startfile is a little odd when it comes to handling absolute
25- # paths, so we briefly switch to the main test directory
26- # and use a relative path
27- with support .change_cwd (support .TEST_HOME ):
28- empty = "empty.vbs"
24+ # We need to make sure the child process starts in a directory
25+ # we're not about to delete. If we're running under -j, that
26+ # means the test harness provided directory isn't a safe option.
27+ # See http://bugs.python.org/issue15526 for more details
28+ with support .change_cwd (path .dirname (sys .executable )):
29+ empty = path .join (path .dirname (__file__ ), "empty.vbs" )
2930 startfile (empty )
31+ startfile (empty , "open" )
3032
3133def test_main ():
3234 support .run_unittest (TestCase )
You can’t perform that action at this time.
0 commit comments