Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 015b453 commit 2f253e8Copy full SHA for 2f253e8
1 file changed
Lib/test/test_startfile.py
@@ -21,12 +21,12 @@ def test_nonexisting(self):
21
self.assertRaises(OSError, startfile, "nonexisting.vbs")
22
23
def test_empty(self):
24
- # Switch to an existing, but safe, working directory to let the
25
- # cleanup code do its thing without permission errors.
26
- with support.temp_cwd(path=path.dirname(sys.executable)):
27
- empty = path.join(path.dirname(__file__), "empty.vbs")
+ # 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):
28
+ empty = "empty.vbs"
29
startfile(empty)
- startfile(empty, "open")
30
31
def test_main():
32
support.run_unittest(TestCase)
0 commit comments