set DESTRUCTIVE_TESTS environment variable for pytest

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

View file

@ -253,6 +253,7 @@ def pytest_runtest_setup(item):
if destructive_tests_marker is not None:
if item.config.getoption('--run-destructive') is False:
pytest.skip('Destructive tests are disabled')
os.environ['DESTRUCTIVE_TESTS'] = six.text_type(item.config.getoption('--run-destructive'))
expensive_tests_marker = item.get_marker('expensive_test')
if expensive_tests_marker is not None: