Browse Source

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
Sean Dague 4 years ago
parent
commit
d96f13d2e2
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      tox.ini

+ 3
- 1
tox.ini View File

@@ -11,7 +11,9 @@ setenv = VIRTUAL_ENV={envdir}
11 11
 
12 12
 deps = -r{toxinidir}/requirements.txt
13 13
        -r{toxinidir}/test-requirements.txt
14
-commands = python setup.py testr --testr-args='{posargs}'
14
+commands =
15
+  find . -type f -name "*.pyc" -delete
16
+  python setup.py testr --testr-args='{posargs}'
15 17
 
16 18
 [testenv:pep8]
17 19
 commands = flake8 {posargs}

Loading…
Cancel
Save