From 51abec65dd218973c3a478af7175a9ccf103de31 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 17 Jan 2017 20:54:04 -0500 Subject: Prevent race conditions from failing tests during 'import usepkgs' --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index ea36b803..4e0b9edd 100644 --- a/tox.ini +++ b/tox.ini @@ -38,6 +38,13 @@ commands = # Remove the C extension so that we can test the PyTracer python igor.py zip_mods install_egg remove_extension + # When running parallel tests, many processes might all try to import the + # same modules at once. This should be safe, but especially on Python 3.3, + # this caused a number of test failures trying to import usepkgs. To + # prevent the race condition, pre-compile the tests/modules directory. + py33: python -m compileall -q -f tests/modules + py33: python -c "import time; time.sleep(1.1)" + # Test with the PyTracer python igor.py test_with_tracer py {posargs} -- cgit v1.2.1