From 99d72d940f3bf3c06ae1a4bc638ce8975c082480 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Thu, 26 Nov 2026 13:30:51 +0100 Subject: [PATCH] Clarify where `pytest` gets the "TESTING" variable from --- noxfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index faa3629..de852e1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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')