mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Fix meta path
This commit is contained in:
parent
a57bdeecac
commit
8c758ed1eb
|
@ -164,17 +164,17 @@ def test_load_model_version_compat():
|
||||||
|
|
||||||
# additional compatible upper pin
|
# additional compatible upper pin
|
||||||
nlp.meta["spacy_version"] = ">=2.3.0,<2.4.0"
|
nlp.meta["spacy_version"] = ">=2.3.0,<2.4.0"
|
||||||
srsly.write_json(Path(d / "meta.json"), nlp.meta)
|
srsly.write_json(meta_path, nlp.meta)
|
||||||
util.get_model_meta(d)
|
util.get_model_meta(d)
|
||||||
|
|
||||||
# incompatible older version
|
# incompatible older version
|
||||||
nlp.meta["spacy_version"] = ">=2.2.5"
|
nlp.meta["spacy_version"] = ">=2.2.5"
|
||||||
srsly.write_json(Path(d / "meta.json"), nlp.meta)
|
srsly.write_json(meta_path, nlp.meta)
|
||||||
with pytest.warns(UserWarning):
|
with pytest.warns(UserWarning):
|
||||||
util.get_model_meta(d)
|
util.get_model_meta(d)
|
||||||
|
|
||||||
# invalid version specification
|
# invalid version specification
|
||||||
nlp.meta["spacy_version"] = ">@#$%_invalid_version"
|
nlp.meta["spacy_version"] = ">@#$%_invalid_version"
|
||||||
srsly.write_json(Path(d / "meta.json"), nlp.meta)
|
srsly.write_json(meta_path, nlp.meta)
|
||||||
with pytest.warns(UserWarning):
|
with pytest.warns(UserWarning):
|
||||||
util.get_model_meta(d)
|
util.get_model_meta(d)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user