]> granicus.if.org Git - python/commit
bpo-35798: Add test.support.check_syntax_warning(). (#11895)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 19 Feb 2019 06:30:15 +0000 (08:30 +0200)
committerGitHub <noreply@github.com>
Tue, 19 Feb 2019 06:30:15 +0000 (08:30 +0200)
commite7a4bb554edb72fc6619d23241d59162d06f249a
treeba74116b687307c63725d6bed28fce0e46cade90
parentee0f927bd8dba805a04963dbec1ad49fe830b842
bpo-35798: Add test.support.check_syntax_warning(). (#11895)

It checks that a SyntaxWarning is raised when compile specified
statement, that it is raised only once, that it is converted to
a SyntaxError when raised as exception, and that both warning and
exception objects have corresponding attributes.
Doc/library/test.rst
Lib/test/support/__init__.py
Lib/test/test_grammar.py
Lib/test/test_string_literals.py
Misc/NEWS.d/next/Tests/2019-02-16-15-19-31.bpo-35798.JF16MP.rst [new file with mode: 0644]