[Python-checkins] cpython (merge 3.1 -> 3.2): Merge test_startfile fix from 3.1.
nadeem.vawda
python-checkins at python.org
Tue Apr 19 02:29:19 CEST 2011
http://hg.python.org/cpython/rev/8abab11fcb29
changeset: 69434:8abab11fcb29
branch: 3.2
parent: 69429:a55c32f161dd
parent: 69433:8b7b3748f876
user: Nadeem Vawda <nadeem.vawda at gmail.com>
date: Tue Apr 19 01:40:45 2011 +0200
summary:
Merge test_startfile fix from 3.1.
files:
Lib/test/test_startfile.py | 5 +++++
Misc/NEWS | 2 ++
2 files changed, 7 insertions(+), 0 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
@@ -11,6 +11,7 @@
from test import support
import os
from os import path
+from time import sleep
startfile = support.get_attribute(os, 'startfile')
@@ -23,6 +24,10 @@
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)
def test_main():
support.run_unittest(TestCase)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -751,6 +751,8 @@
Tests
-----
+- Fix test_startfile to wait for child process to terminate before finishing.
+
- Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
by Ross Lagerwall.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list