From 81fe94de6e2261ba75c65233ba8dfbae7180640d Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Mon, 13 May 2019 13:13:36 -0600 Subject: TST: Register markers in conftest.py. Register the markers 'slow' and 'valgrind' in the `conftest.py` file instead of `pytest.ini` as the latter file is not always present. --- numpy/conftest.py | 7 +++++++ pytest.ini | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/numpy/conftest.py b/numpy/conftest.py index 4d4d055ec..7834dd39d 100644 --- a/numpy/conftest.py +++ b/numpy/conftest.py @@ -13,6 +13,13 @@ _old_fpu_mode = None _collect_results = {} +def pytest_configure(config): + config.addinivalue_line("markers", + "valgrind_error: Tests that are known to error under valgrind.") + config.addinivalue_line("markers", + "slow: Tests that are very slow.") + + #FIXME when yield tests are gone. @pytest.hookimpl() def pytest_itemcollected(item): diff --git a/pytest.ini b/pytest.ini index 1ddfb6009..4748e3575 100644 --- a/pytest.ini +++ b/pytest.ini @@ -24,7 +24,3 @@ filterwarnings = env = PYTHONHASHSEED=0 - -markers = - valgrind_error: Known to cause errors under valgrind - slow: Tests which are slow -- cgit v1.2.1