From: Mike Bayer Date: Sun, 11 Dec 2022 20:47:25 +0000 (-0500) Subject: add color directives X-Git-Tag: rel_1_4_46~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f279ce32235a69b9db6a0048230db9c34ff70db;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git add color directives See https://tox.wiki/en/latest/faq.html#tox-4-known-regressions Change-Id: I3c7291a660dc167bce3151e02cd123edc4707ca1 (cherry picked from commit 184508afbb7656c4f51d98695bbeeeec9aae9b87) --- diff --git a/tox.ini b/tox.ini index f972728659..f007614b3b 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