add EXPENSIVE_TESTS

This commit is contained in:
Daniel Wallace 2018-06-05 09:21:53 -05:00
parent 055cd5a6ba
commit 5a41f484ef
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48

View file

@ -259,6 +259,7 @@ def pytest_runtest_setup(item):
if expensive_tests_marker is not None:
if item.config.getoption('--run-expensive') is False:
pytest.skip('Expensive tests are disabled')
os.environ['EXPENSIVE_TESTS'] = six.text_type(item.config.getoption('--run-expensive'))
skip_if_not_root_marker = item.get_marker('skip_if_not_root')
if skip_if_not_root_marker is not None: