From 5424b70e51277049fac470a5c5458830202d03f0 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sat, 20 Jun 2020 16:18:53 +0200 Subject: [PATCH] Remove v2 test --- spacy/tests/test_misc.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/spacy/tests/test_misc.py b/spacy/tests/test_misc.py index cc6d3a57d..5f9e72f79 100644 --- a/spacy/tests/test_misc.py +++ b/spacy/tests/test_misc.py @@ -107,36 +107,6 @@ def test_load_model_blank_shortcut(): util.load_model("blank:fjsfijsdof") -def test_load_model_version_compat(): - """Test warnings for various spacy_version specifications in meta. Since - this is more of a hack for v2, manually specify the current major.minor - version to simplify test creation.""" - nlp = util.load_model("blank:en") - assert nlp.meta["spacy_version"].startswith(">=2.3") - with make_tempdir() as d: - # no change: compatible - nlp.to_disk(d) - meta_path = Path(d / "meta.json") - util.get_model_meta(d) - - # additional compatible upper pin - nlp.meta["spacy_version"] = ">=2.3.0,<2.4.0" - srsly.write_json(meta_path, nlp.meta) - util.get_model_meta(d) - - # incompatible older version - nlp.meta["spacy_version"] = ">=2.2.5" - srsly.write_json(meta_path, nlp.meta) - with pytest.warns(UserWarning): - util.get_model_meta(d) - - # invalid version specification - nlp.meta["spacy_version"] = ">@#$%_invalid_version" - srsly.write_json(meta_path, nlp.meta) - with pytest.warns(UserWarning): - util.get_model_meta(d) - - @pytest.mark.parametrize( "version,constraint,compatible", [