diff options
Diffstat (limited to 'tests/test_phystokens.py')
-rw-r--r-- | tests/test_phystokens.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py index fea581a5..f3985437 100644 --- a/tests/test_phystokens.py +++ b/tests/test_phystokens.py @@ -15,7 +15,6 @@ from coverage.phystokens import neuter_encoding_declaration, compile_unicode from coverage.python import get_python_source from tests.coveragetest import CoverageTest, TESTS_DIR -from tests.helpers import re_lines # A simple program and its token stream. @@ -102,11 +101,11 @@ class PhysTokensTest(CoverageTest): stress = os.path.join(TESTS_DIR, "stress_phystoken.tok") self.check_file_tokenization(stress) with open(stress) as fstress: - assert re_lines(fstress.read(), r"\s$"), f"{stress} needs a trailing space." + assert re.search(r"\s$", fstress.read()), f"{stress} needs a trailing space." stress = os.path.join(TESTS_DIR, "stress_phystoken_dos.tok") self.check_file_tokenization(stress) with open(stress) as fstress: - assert re_lines(fstress.read(), r"\s$"), f"{stress} needs a trailing space." + assert re.search(r"\s$", fstress.read()), f"{stress} needs a trailing space." @pytest.mark.skipif(not env.PYBEHAVIOR.soft_keywords, reason="Soft keywords are new in Python 3.10") |