From c57f205a2a542d972ca717024769a3f86fefa06b Mon Sep 17 00:00:00 2001 From: "OTSUKA, Yuanying" Date: Tue, 17 Nov 2015 10:08:28 +0900 Subject: [PATCH] Delete python bytecode before every test run Because python creates pyc files during tox runs, certain changes in the tree, like deletes of files, or switching branches, can create spurious errors. Change-Id: Id8798992dd71d9a7b16cba9e822bab236f0fcad7 Closes-Bug: #1368661 --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 07cceed1af..46d18096c0 100644 --- a/tox.ini +++ b/tox.ini @@ -9,11 +9,13 @@ usedevelop = True install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = pip install pymongo===3.0.3 +commands = find . -type f -name "*.pyc" -delete + pip install pymongo===3.0.3 {envpython} run_tests.py python setup.py testr --slowest {envpython} generate_examples.py whitelist_externals = bash + find [tox:jenkins] sitepackages = True