Remove outdated options and fix formatting
@@ -9,12 +9,6 @@ def pytest_addoption(parser):
parser.addoption("--slow", action="store_true", help="include slow tests")
-def pytest_runtest_setup(item):
- for opt in ["slow"]:
- if opt in item.keywords and not item.config.getoption("--%s" % opt):
- pytest.skip("need --%s option to run" % opt)
-
-
@pytest.fixture(scope="module")
def tokenizer():
return get_lang_class("xx").Defaults.create_tokenizer()
@@ -143,6 +137,7 @@ def ru_tokenizer():
pymorphy = pytest.importorskip("pymorphy2")
return get_lang_class("ru").Defaults.create_tokenizer()
+
def pytest_runtest_setup(item):
def getopt(opt):
# When using 'pytest --pyargs spacy' to test an installed copy of
@@ -153,13 +148,6 @@ def pytest_runtest_setup(item):
# options weren't given.
return item.config.getoption("--%s" % opt, False)
- for opt in ['models', 'vectors', 'slow']:
+ for opt in ["slow"]:
if opt in item.keywords and not getopt(opt):
pytest.skip("need --%s option to run" % opt)
-
- # Check if test is marked with models and has arguments set, i.e. specific
- # language. If so, skip test if flag not set.
- if item.get_marker('models'):
- for arg in item.get_marker('models').args:
- if not getopt(arg) and not getopt("all"):
- pytest.skip("need --%s or --all option to run" % arg)
