Skip to content

Commit 95db73a

Browse files
authored
Fix regex -> re import. (#205)
1 parent fb39338 commit 95db73a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

spacy_llm/tests/tasks/test_summarization.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import re
12
from pathlib import Path
23

34
import pytest
4-
import regex
55
import spacy
66
from confection import Config
77
from spacy.util import make_tempdir
@@ -181,7 +181,7 @@ def test_summarization_predict(cfg_string, example_text, request):
181181
if orig_cfg_string == "fewshot_cfg_string":
182182
with pytest.warns(
183183
UserWarning,
184-
match=regex.escape(
184+
match=re.escape(
185185
"The provided example 'Life is a quality th...' has a summary of length 28, but `max_n_words` == 20."
186186
),
187187
):
@@ -228,7 +228,7 @@ def test_summarization_io(cfg_string_and_field, example_text, request):
228228
if orig_cfg_string == "fewshot_cfg_string":
229229
with pytest.warns(
230230
UserWarning,
231-
match=regex.escape(
231+
match=re.escape(
232232
"The provided example 'Life is a quality th...' has a summary of length 28, but `max_n_words` == 20."
233233
),
234234
):
@@ -293,7 +293,7 @@ def test_jinja_template_rendering_with_examples(examples_path, example_text):
293293

294294
with pytest.warns(
295295
UserWarning,
296-
match=regex.escape(
296+
match=re.escape(
297297
"The provided example 'Life is a quality th...' has a summary of length 28, but `max_n_words` == 20."
298298
),
299299
):

0 commit comments

Comments
 (0)