diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-06 15:51:44 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-06 16:16:04 -0500 |
commit | 556344babd5210c093eba547d1b15489843f4359 (patch) | |
tree | 5ea9c3f84044722f116ebbfad4bb66cda91b8a87 /tests/test_parser.py | |
parent | faaf0d45abcf0a11c9e5db144c5b79f581dd92eb (diff) | |
download | python-coveragepy-git-556344babd5210c093eba547d1b15489843f4359.tar.gz |
refactor: no need for special handling of compiling unicode source
This was a holdover from Python 2 days.
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r-- | tests/test_parser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py index 6d181c9e..b13c32fe 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -3,6 +3,7 @@ """Tests for coverage.py's code parsing.""" +import ast import os.path import textwrap import warnings @@ -11,7 +12,7 @@ import pytest from coverage import env from coverage.exceptions import NotPython -from coverage.parser import ast_dump, ast_parse, PythonParser +from coverage.parser import ast_dump, PythonParser from tests.coveragetest import CoverageTest, TESTS_DIR from tests.helpers import arcz_to_arcs, re_lines, xfail_pypy_3749 @@ -530,7 +531,7 @@ def test_ast_dump(): with warnings.catch_warnings(): # stress_phystoken.tok has deprecation warnings, suppress them. warnings.filterwarnings("ignore", message=r".*invalid escape sequence",) - ast_root = ast_parse(source) + ast_root = ast.parse(source) result = [] ast_dump(ast_root, print=result.append) if num_lines < 100: |