From d96f13d2e2d7c0e8509e4fac8f151bc090a97930 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 12 Sep 2014 06:53:02 -0400 Subject: [PATCH] delete python bytecode before every test run Bring over the cleaning line from run_tests.sh for the pyc files to all the tox runs. This should eliminate the need to clean -x -i to kill pyc files in your local directory to get tests to pass. Related-Bug: #1368661 Change-Id: I00ee418eea2d82031bb510b09e63e2ec87fb1b09 --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 40978d654..53fa8719f 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,9 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --testr-args='{posargs}' +commands = + find . -type f -name "*.pyc" -delete + python setup.py testr --testr-args='{posargs}' [testenv:pep8] commands = flake8 {posargs}