rm pyc files before test runs

It's extremely easy for incorrect local results to happen if a file
has been moved or deleted in an upstream pull. Add the rm pyc cantrip
to ensure local testing matches what a clean upstream is going to be
like as much as possible.

Change-Id: Iecf18d7c2310918ec90c14c64cd3083e46459980
diff --git a/tox.ini b/tox.ini
index f75e868..edfee15 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,9 @@
 whitelist_externals = *
 deps = -r{toxinidir}/requirements.txt
        -r{toxinidir}/test-requirements.txt
-commands = bash tools/pretty_tox.sh '{posargs}'
+commands =
+         find . -type f -name "*.pyc" -delete
+         bash tools/pretty_tox.sh '{posargs}'
 
 [testenv:genconfig]
 commands = oslo-config-generator --config-file tools/config/config-generator.tempest.conf
@@ -33,6 +35,7 @@
          OS_TEST_TIMEOUT=1200
 deps = {[tempestenv]deps}
 commands =
+  find . -type f -name "*.pyc" -delete
   bash tools/pretty_tox.sh '{posargs}'
 
 [testenv:full]
@@ -42,6 +45,7 @@
 # The regex below is used to select which tests to run and exclude the slow tag:
 # See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
 commands =
+  find . -type f -name "*.pyc" -delete
   bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
 
 [testenv:full-serial]
@@ -51,6 +55,7 @@
 # The regex below is used to select which tests to run and exclude the slow tag:
 # See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
 commands =
+  find . -type f -name "*.pyc" -delete
   bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
 
 [testenv:heat-slow]
@@ -60,6 +65,7 @@
 deps = {[tempestenv]deps}
 # The regex below is used to select heat api/scenario tests tagged as slow.
 commands =
+  find . -type f -name "*.pyc" -delete
   bash tools/pretty_tox.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
 
 [testenv:large-ops]
@@ -67,6 +73,7 @@
 setenv = {[tempestenv]setenv}
 deps = {[tempestenv]deps}
 commands =
+  find . -type f -name "*.pyc" -delete
   python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
 
 [testenv:smoke]
@@ -74,6 +81,7 @@
 setenv = {[tempestenv]setenv}
 deps = {[tempestenv]deps}
 commands =
+  find . -type f -name "*.pyc" -delete
    bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
 
 [testenv:smoke-serial]
@@ -84,6 +92,7 @@
 # https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
 # job would fail if we moved it to parallel.
 commands =
+  find . -type f -name "*.pyc" -delete
    bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
 
 [testenv:stress]