Apply suggestions from code review

This commit is contained in:
Bruno Oliveira 2024-04-28 14:08:13 -03:00 committed by Bruno Oliveira
parent 6dacba6cda
commit 1b1ae30606
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
Updated docs: Documented new way to detect if a code is running from within a pytest run
Documented using :envvar:`PYTEST_VERSION` to detect if code is running from within a pytest run.

View File

@ -413,10 +413,10 @@ running from a test you can do this:
if os.environ.get("PYTEST_VERSION") is not None:
# things you want to to do if your code is called by pytest
# Things you want to to do if your code is called by pytest.
...
else:
# things you want to to do if your code is not called by pytest
# Things you want to to do if your code is not called by pytest.
...