Apply suggestions from code review
This commit is contained in:
parent
6dacba6cda
commit
1b1ae30606
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
...
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue