summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-08-29 21:36:24 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-08-29 21:36:24 -0400
commitf8b11442aae7fffcb093534f9a5e5081fdeffabb (patch)
tree30e88335fe8b2358599c37b27c7eb7aa2538045b
parent23c8ea68e19922450632516607e548a78f017b01 (diff)
downloadpython-coveragepy-git-f8b11442aae7fffcb093534f9a5e5081fdeffabb.tar.gz
build: defend against a local PYTHONPYCACHEPREFIX setting
I had PYTYHONPYCACHEPREFIX=/tmp/pyc in my local shell, which put pyc files elsewhere. A few tests care very much about .pyc files, so those tests failed. This setting in tox.ini will ensure that .pyc files are written locally so the tests will pass.
-rw-r--r--tox.ini3
1 files changed, 3 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index 76a1b1db..d1b89374 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,6 +31,9 @@ setenv =
pypy,pypy3: COVERAGE_NO_CTRACER=no C extension under PyPy
jython: COVERAGE_NO_CTRACER=no C extension under Jython
jython: PYTEST_ADDOPTS=-n 0
+ # For some tests, we need .pyc files written in the current directory,
+ # so override any local setting.
+ PYTHONPYCACHEPREFIX=
commands =
python setup.py --quiet clean develop