Wait for the child process to terminate before ending the test, so that the
regrtest cleanup code doesn't get an error when it tries to delete the
temporary CWD.
from test import support
import os
from os import path
+from time import sleep
startfile = support.get_attribute(os, 'startfile')
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)
Tests
-----
+- Fix test_startfile to wait for child process to terminate before finishing.
+
- Issue #11719: Fix message about unexpected test_msilib skip on non-Windows
platforms. Patch by Nadeem Vawda.