Merge pull request #2418 from axil/master
small fix in an example from the docs
This commit is contained in:
commit
637550b249
|
@ -269,6 +269,7 @@ running from a test you can do something like this:
|
||||||
sys._called_from_test = True
|
sys._called_from_test = True
|
||||||
|
|
||||||
def pytest_unconfigure(config):
|
def pytest_unconfigure(config):
|
||||||
|
import sys
|
||||||
del sys._called_from_test
|
del sys._called_from_test
|
||||||
|
|
||||||
and then check for the ``sys._called_from_test`` flag:
|
and then check for the ``sys._called_from_test`` flag:
|
||||||
|
|
Loading…
Reference in New Issue