From bf06ebff63fd092d75d9eaebe3c7c1091e6334c3 Mon Sep 17 00:00:00 2001 From: "OTSUKA, Yuanying" Date: Tue, 17 Nov 2015 10:09:25 +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: I948892fb820f3d0583731627068ae3aa254121e7 Closes-Bug: #1368661 --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a7bcc0ef..1c93420f 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,9 @@ usedevelop = True install_command = pip install -U {opts} {packages} 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}' +whitelist_externals = find [testenv:pep8] commands = flake8