Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
07085332
Commit
07085332
authored
Sep 16, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Issue #15526: try to fix test_startfile's inability to clean up after itself in time.
Patch by Jeremy Kloth.
parents
a5377caf
8a53dbeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
Lib/test/test_startfile.py
Lib/test/test_startfile.py
+7
-8
No files found.
Lib/test/test_startfile.py
View file @
07085332
...
...
@@ -10,8 +10,8 @@
import
unittest
from
test
import
support
import
os
import
sys
from
os
import
path
from
time
import
sleep
startfile
=
support
.
get_attribute
(
os
,
'startfile'
)
...
...
@@ -21,13 +21,12 @@ class TestCase(unittest.TestCase):
self
.
assertRaises
(
OSError
,
startfile
,
"nonexisting.vbs"
)
def
test_empty
(
self
):
empty
=
path
.
join
(
path
.
dirname
(
__file__
),
"empty.vbs"
)
startfile
(
empty
)
startfile
(
empty
,
"open"
)
# Give the child process some time to exit before we finish.
# Otherwise the cleanup code will not be able to delete the cwd,
# because it is still in use.
sleep
(
0.1
)
# Switch to an existing, but safe, working directory to let the
# cleanup code do its thing without permission errors.
with
support
.
temp_cwd
(
path
=
path
.
dirname
(
sys
.
executable
)):
empty
=
path
.
join
(
path
.
dirname
(
__file__
),
"empty.vbs"
)
startfile
(
empty
)
startfile
(
empty
,
"open"
)
def
test_main
():
support
.
run_unittest
(
TestCase
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment