summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-12-11 15:47:25 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-12-11 17:25:18 -0500
commit2f279ce32235a69b9db6a0048230db9c34ff70db (patch)
tree2bdc29b1941bd86926ec05c0b61285b0c245fa4b
parent39299672ff7bc9f759714e2546b2fea0ab2e9990 (diff)
downloadsqlalchemy-2f279ce32235a69b9db6a0048230db9c34ff70db.tar.gz
add color directives
See https://tox.wiki/en/latest/faq.html#tox-4-known-regressions Change-Id: I3c7291a660dc167bce3151e02cd123edc4707ca1 (cherry picked from commit 184508afbb7656c4f51d98695bbeeeec9aae9b87)
-rw-r--r--tox.ini11
1 files changed, 7 insertions, 4 deletions
diff --git a/tox.ini b/tox.ini
index f97272865..f007614b3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -73,8 +73,11 @@ allowlist_externals=sh, /bin/true
setenv=
PYTHONPATH=
PYTHONNOUSERSITE=1
+
+ PYTEST_COLOR={tty:--color=yes}
+
MEMUSAGE=--nomemory
- BASECOMMAND=python -m pytest --rootdir {toxinidir} --log-info=sqlalchemy.testing
+ BASECOMMAND=python -m pytest {env:PYTEST_COLOR} --rootdir {toxinidir} --log-info=sqlalchemy.testing
WORKERS={env:TOX_WORKERS:-n4 --max-worker-restart=5}
@@ -156,7 +159,7 @@ deps=
patch==1.*
git+https://github.com/sqlalchemy/sqlalchemy2-stubs
commands =
- pytest test/ext/mypy/test_mypy_plugin_py3k.py {posargs}
+ pytest {env:PYTEST_COLOR} test/ext/mypy/test_mypy_plugin_py3k.py {posargs}
# thanks to https://julien.danjou.info/the-best-flake8-extensions/
[testenv:pep8]
@@ -183,7 +186,7 @@ commands =
deps = {[testenv]deps}
.[aiosqlite]
commands=
- python -m pytest {env:PY_SPECIFIC} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
+ python -m pytest {env:PYTEST_COLOR} {env:PY_SPECIFIC} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
oracle,mssql,sqlite_file: python reap_dbs.py db_idents.txt
# command run in the github action when cext are not active.
@@ -191,5 +194,5 @@ commands=
deps = {[testenv]deps}
.[aiosqlite]
commands=
- python -m pytest {env:PY_SPECIFIC} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
+ python -m pytest {env:PYTEST_COLOR} {env:PY_SPECIFIC} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
oracle,mssql,sqlite_file: python reap_dbs.py db_idents.txt