Do not generate bytecode in tests

This is a known best practise during development, to avoid leaving
stale bytecode after a file is deleted.

Change-Id: Ic24e1cdb6c007f64aed379dd8cdc0482da4f52a3
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-10-04 03:21:00 +09:00
1 parent 02f0610069
commit 49c48866b3
1 file changed
+4 -2
+4 -2
View File
@@ -4,15 +4,15 @@ minversion = 4.28.0
[testenv]
usedevelop = True
setenv =
PYTHONDONTWRITEBYTECODE=1
constraints =
{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.py[c|o]" -delete
stestr run --slowest {posargs}
allowlist_externals = find
[testenv:debug]
commands = oslo_debug_helper -t heatclient/tests {posargs}
@@ -29,12 +29,14 @@ commands = {posargs}
[testenv:functional]
setenv =
{[testenv]setenv}
OS_TEST_PATH = ./heatclient/tests/functional
CLIENT_NAME=python-heatclient
passenv = OS_*
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source heatclient --parallel-mode
commands =
stestr run {posargs}