summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2011-04-18 23:40:45 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2011-04-18 23:40:45 (GMT)
commitcc3f02938037550118e008e9130534b84e887682 (patch)
tree80a91a50bbe5e3f536967e4892d3a4e89ea4d37a
parent530cc09796d139a3b86a16d899d88a93bcc0855f (diff)
parent58de6ee8711a079da0b555221ae739d6a69df2f7 (diff)
downloadcpython-cc3f02938037550118e008e9130534b84e887682.zip
cpython-cc3f02938037550118e008e9130534b84e887682.tar.gz
cpython-cc3f02938037550118e008e9130534b84e887682.tar.bz2
Merge test_startfile fix from 3.1.
-rw-r--r--Lib/test/test_startfile.py5
-rw-r--r--Misc/NEWS2
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_startfile.py b/Lib/test/test_startfile.py
index 7a003eb..dd505bf 100644
--- a/Lib/test/test_startfile.py
+++ b/Lib/test/test_startfile.py
@@ -11,6 +11,7 @@ import unittest
from test import support
import os
from os import path
+from time import sleep
startfile = support.get_attribute(os, 'startfile')
@@ -23,6 +24,10 @@ class TestCase(unittest.TestCase):
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
index a34f009..c1fb164 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -751,6 +751,8 @@ Tools/Demos
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.