summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2020-04-29 01:42:27 (GMT)
committerGitHub <noreply@github.com>2020-04-29 01:42:27 (GMT)
commit6d6508765514c7c10719478a0430f5e47c9a96ac (patch)
treecab1123e87fe03272d86dae862cf335d9e709e81 /Lib
parenta4dfe8ede5a37576e17035dccfe109ba7752237e (diff)
downloadcpython-6d6508765514c7c10719478a0430f5e47c9a96ac.zip
cpython-6d6508765514c7c10719478a0430f5e47c9a96ac.tar.gz
cpython-6d6508765514c7c10719478a0430f5e47c9a96ac.tar.bz2
bpo-40334: Disallow invalid single statements in the new parser (GH-19774)
After parsing is done in single statement mode, the tokenizer buffer has to be checked for additional lines and a `SyntaxError` must be raised, in case there are any. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_compile.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index a507ac0..566ca27 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -501,7 +501,6 @@ if 1:
self.compile_single("if x:\n f(x)\nelse:\n g(x)")
self.compile_single("class T:\n pass")
- @support.skip_if_new_parser('Pegen does not disallow multiline single stmts')
def test_bad_single_statement(self):
self.assertInvalidSingle('1\n2')
self.assertInvalidSingle('def f(): pass')