diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/python/parso/py2/tests/test_pep8.py | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/parso/py2/tests/test_pep8.py')
-rw-r--r-- | contrib/python/parso/py2/tests/test_pep8.py | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/contrib/python/parso/py2/tests/test_pep8.py b/contrib/python/parso/py2/tests/test_pep8.py index 44c11f4f55..fe65278de2 100644 --- a/contrib/python/parso/py2/tests/test_pep8.py +++ b/contrib/python/parso/py2/tests/test_pep8.py @@ -1,39 +1,39 @@ -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_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_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') |