Commit 2f253e8e authored by Nick Coghlan's avatar Nick Coghlan

Attempt to fix #15415 on Windows

parent 015b4535
...@@ -21,12 +21,12 @@ class TestCase(unittest.TestCase): ...@@ -21,12 +21,12 @@ class TestCase(unittest.TestCase):
self.assertRaises(OSError, startfile, "nonexisting.vbs") self.assertRaises(OSError, startfile, "nonexisting.vbs")
def test_empty(self): def test_empty(self):
# Switch to an existing, but safe, working directory to let the # startfile is a little odd when it comes to handling absolute
# cleanup code do its thing without permission errors. # paths, so we briefly switch to the main test directory
with support.temp_cwd(path=path.dirname(sys.executable)): # and use a relative path
empty = path.join(path.dirname(__file__), "empty.vbs") with support.change_cwd(support.TEST_HOME):
empty = "empty.vbs"
startfile(empty) startfile(empty)
startfile(empty, "open")
def test_main(): def test_main():
support.run_unittest(TestCase) support.run_unittest(TestCase)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment