From 75218d289ed27b4eddd645436275b1e51aed0fab Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Wed, 23 Feb 2022 21:25:29 +0100 Subject: [PATCH] Delete python bytecode before every test run Because python creates pyc files during tox runs, certain changes in the tree, like branch switching or file deletion, can create spurious errors. Closes-Bug: #1368661 Change-Id: I93917b051039506d99837028700bc03337cf68f6 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 717a238..4cb7a27 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ skipsdist = True usedevelop = True setenv = OS_STDOUT_NOCAPTURE=False OS_STDERR_NOCAPTURE=False + PYTHONDONTWRITEBYTECODE=1 # Nowadays, TOX_CONSTRAINTS_FILE should be used, but some older scripts might # still be using UPPER_CONSTRAINTS_FILE, so we check both variables and use the