aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/parso/py3/tests/test_pep8.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/py3/tests/test_pep8.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/py3/tests/test_pep8.py')
-rw-r--r--contrib/python/parso/py3/tests/test_pep8.py84
1 files changed, 42 insertions, 42 deletions
diff --git a/contrib/python/parso/py3/tests/test_pep8.py b/contrib/python/parso/py3/tests/test_pep8.py
index a65ccd6fce..06cffb4af9 100644
--- a/contrib/python/parso/py3/tests/test_pep8.py
+++ b/contrib/python/parso/py3/tests/test_pep8.py
@@ -1,42 +1,42 @@
-import parso
-
-
-def issues(code):
- grammar = parso.load_grammar()
- module = parso.parse(code)
- return grammar._get_normalizer_issues(module)
-
-
-def test_eof_newline():
- def assert_issue(code):
- found = issues(code)
- assert len(found) == 1
- issue, = found
- assert issue.code == 292
-
- assert not issues('asdf = 1\n')
- assert not issues('asdf = 1\r\n')
- assert not issues('asdf = 1\r')
- assert_issue('asdf = 1')
- assert_issue('asdf = 1\n# foo')
- assert_issue('# foobar')
- assert_issue('')
- assert_issue('foo = 1 # comment')
-
-
-def test_eof_blankline():
- def assert_issue(code):
- found = issues(code)
- assert len(found) == 1
- issue, = found
- assert issue.code == 391
-
- assert_issue('asdf = 1\n\n')
- assert_issue('# foobar\n\n')
- assert_issue('\n\n')
-
-
-def test_shebang():
- assert not issues('#!\n')
- assert not issues('#!/foo\n')
- assert not issues('#! python\n')
+import parso
+
+
+def issues(code):
+ grammar = parso.load_grammar()
+ module = parso.parse(code)
+ return grammar._get_normalizer_issues(module)
+
+
+def test_eof_newline():
+ def assert_issue(code):
+ found = issues(code)
+ assert len(found) == 1
+ issue, = found
+ assert issue.code == 292
+
+ assert not issues('asdf = 1\n')
+ assert not issues('asdf = 1\r\n')
+ assert not issues('asdf = 1\r')
+ assert_issue('asdf = 1')
+ assert_issue('asdf = 1\n# foo')
+ assert_issue('# foobar')
+ assert_issue('')
+ assert_issue('foo = 1 # comment')
+
+
+def test_eof_blankline():
+ def assert_issue(code):
+ found = issues(code)
+ assert len(found) == 1
+ issue, = found
+ assert issue.code == 391
+
+ assert_issue('asdf = 1\n\n')
+ assert_issue('# foobar\n\n')
+ assert_issue('\n\n')
+
+
+def test_shebang():
+ assert not issues('#!\n')
+ assert not issues('#!/foo\n')
+ assert not issues('#! python\n')