Support calling the tests by using pytest instead of just py.test

This commit is contained in:
mprahl
2017-09-13 10:04:03 -04:00
parent 8db5de5a81
commit 79a79fdcf2

View File

@@ -72,7 +72,7 @@ def init_config(app):
if 'MBS_CONFIG_SECTION' in app.request.environ:
config_section = app.request.environ['MBS_CONFIG_SECTION']
# TestConfiguration shall only be used for running tests, otherwise...
if any(['nosetests' in arg or 'noserunner.py' in arg or 'py.test' in arg or 'pytest.py' in arg for arg in sys.argv]):
if any(['nosetests' in arg or 'noserunner.py' in arg or 'py.test' in arg or 'pytest' in arg for arg in sys.argv]):
config_section = 'TestConfiguration'
from conf import config
config_module = config