mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Add simple test for surrounding brackets
This commit is contained in:
parent
0ba5cf51d2
commit
487e020ebe
|
@ -50,6 +50,15 @@ def test_tokenizer_handles_suffixed_url(tokenizer, url, suffix):
|
||||||
assert tokens[1].text == suffix
|
assert tokens[1].text == suffix
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("url", URLS)
|
||||||
|
def test_tokenizer_handles_simple_surround_url(tokenizer, url):
|
||||||
|
tokens = tokenizer("(" + url + ")")
|
||||||
|
assert len(tokens) == 3
|
||||||
|
assert tokens[0].text == "("
|
||||||
|
assert tokens[1].text == url
|
||||||
|
assert tokens[2].text == ")"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("prefix", PREFIXES)
|
@pytest.mark.parametrize("prefix", PREFIXES)
|
||||||
@pytest.mark.parametrize("suffix", SUFFIXES)
|
@pytest.mark.parametrize("suffix", SUFFIXES)
|
||||||
@pytest.mark.parametrize("url", URLS)
|
@pytest.mark.parametrize("url", URLS)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user