()
| 1005 | |
| 1006 | |
| 1007 | def test_applycli_user_data(): |
| 1008 | Doc.set_extension("ext", default=0) |
| 1009 | val = ("ext", 0) |
| 1010 | with make_tempdir() as data_path: |
| 1011 | output = data_path / "testout.spacy" |
| 1012 | nlp = spacy.blank("en") |
| 1013 | doc = nlp("testing apply cli.") |
| 1014 | doc._.ext = val |
| 1015 | docbin = DocBin(store_user_data=True) |
| 1016 | docbin.add(doc) |
| 1017 | docbin.to_disk(data_path / "testin.spacy") |
| 1018 | apply(data_path, output, "blank:en", "", 1, 1) |
| 1019 | result = list(DocBin().from_disk(output).get_docs(nlp.vocab)) |
| 1020 | assert result[0]._.ext == val |
| 1021 | |
| 1022 | |
| 1023 | def test_cli_find_threshold(capsys): |
nothing calls this directly
no test coverage detected
searching dependent graphs…