aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/parso/py2/tests/test_file_python_errors.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/parso/py2/tests/test_file_python_errors.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/parso/py2/tests/test_file_python_errors.py')
-rw-r--r--contrib/python/parso/py2/tests/test_file_python_errors.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/contrib/python/parso/py2/tests/test_file_python_errors.py b/contrib/python/parso/py2/tests/test_file_python_errors.py
index 6c9f4307b7c..7083dfeb467 100644
--- a/contrib/python/parso/py2/tests/test_file_python_errors.py
+++ b/contrib/python/parso/py2/tests/test_file_python_errors.py
@@ -1,23 +1,23 @@
-import os
-
-import parso
-
-
-def get_python_files(path):
- for dir_path, dir_names, file_names in os.walk(path):
- for file_name in file_names:
- if file_name.endswith('.py'):
- yield os.path.join(dir_path, file_name)
-
-
-def test_on_itself(each_version):
- """
- There are obviously no syntax erros in the Python code of parso. However
- parso should output the same for all versions.
- """
- grammar = parso.load_grammar(version=each_version)
- path = os.path.dirname(os.path.dirname(__file__)) + '/parso'
- for file in get_python_files(path):
- tree = grammar.parse(path=file)
- errors = list(grammar.iter_errors(tree))
- assert not errors
+import os
+
+import parso
+
+
+def get_python_files(path):
+ for dir_path, dir_names, file_names in os.walk(path):
+ for file_name in file_names:
+ if file_name.endswith('.py'):
+ yield os.path.join(dir_path, file_name)
+
+
+def test_on_itself(each_version):
+ """
+ There are obviously no syntax erros in the Python code of parso. However
+ parso should output the same for all versions.
+ """
+ grammar = parso.load_grammar(version=each_version)
+ path = os.path.dirname(os.path.dirname(__file__)) + '/parso'
+ for file in get_python_files(path):
+ tree = grammar.parse(path=file)
+ errors = list(grammar.iter_errors(tree))
+ assert not errors