From fdb9dbc506608bd836202d922d0a2336f9e66504 Mon Sep 17 00:00:00 2001 From: Kenji Yasui Date: Mon, 7 Dec 2015 07:09:09 +0000 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: I2d0253b0305792862111db8b1e7adc2289863ee3 Closes-Bug: #1368661 --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index d7a14ff4..43826a2e 100644 --- a/tox.ini +++ b/tox.ini @@ -13,8 +13,9 @@ install_command = {toxinidir}/tools/tox_install.sh {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh -commands = - sh tools/pretty_tox.sh '{posargs}' + find +commands = find . -type f -name "*.py[c|o]" -delete + sh tools/pretty_tox.sh '{posargs}' [testenv:pep8] commands = flake8