Skip to content

Commit edd3d0f

Browse files
committed
Format tests README code blocks for ruff 0.16 markdown formatting
1 parent 82d98b2 commit edd3d0f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎spacy/tests/README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To keep the behavior of the tests consistent and predictable, we try to follow a
5555
If the test cases can be extracted from the test, always `parametrize` them instead of hard-coding them into the test:
5656

5757
```python
58-
@pytest.mark.parametrize('text', ["google.com", "spacy.io"])
58+
@pytest.mark.parametrize("text", ["google.com", "spacy.io"])
5959
def test_tokenizer_keep_urls(tokenizer, text):
6060
tokens = tokenizer(text)
6161
assert len(tokens) == 1
@@ -110,15 +110,15 @@ Loading the models is expensive and not necessary if you're not actually testing
110110
```python
111111
def test_doc_token_api_strings(en_vocab):
112112
words = ["Give", "it", "back", "!", "He", "pleaded", "."]
113-
pos = ['VERB', 'PRON', 'PART', 'PUNCT', 'PRON', 'VERB', 'PUNCT']
113+
pos = ["VERB", "PRON", "PART", "PUNCT", "PRON", "VERB", "PUNCT"]
114114
heads = [0, 0, 0, 0, 5, 5, 5]
115-
deps = ['ROOT', 'dobj', 'prt', 'punct', 'nsubj', 'ROOT', 'punct']
115+
deps = ["ROOT", "dobj", "prt", "punct", "nsubj", "ROOT", "punct"]
116116

117117
doc = Doc(en_vocab, words=words, pos=pos, heads=heads, deps=deps)
118-
assert doc[0].text == 'Give'
119-
assert doc[0].lower_ == 'give'
120-
assert doc[0].pos_ == 'VERB'
121-
assert doc[0].dep_ == 'ROOT'
118+
assert doc[0].text == "Give"
119+
assert doc[0].lower_ == "give"
120+
assert doc[0].pos_ == "VERB"
121+
assert doc[0].dep_ == "ROOT"
122122
```
123123

124124
### Other utilities

0 commit comments

Comments
 (0)