Clarify where pytest gets the "TESTING" variable from
All checks were successful
CI / Tests (Python 3.13) (push) Successful in 1m7s

This commit is contained in:
Alexander Hess 2026-11-26 13:30:51 +01:00
commit 99d72d940f
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -295,7 +295,8 @@ def test(session):
# The "TESTING" environment variable forces the global `engine`, `connection`,
# and `session` objects to be set to `None` and avoid any database connection.
# For pytest above this is not necessary as pytest sets this variable itself.
# For `pytest` above, `pytest-env` sets it with the "env" option
# in the "[tool.pytest.ini_options]" section in pyproject.toml.
session.env['TESTING'] = 'true'
session.run('xdoctest', '--version')