summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_future_stmt/badsyntax_future.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-09-19 12:01:59 (GMT)
committerGitHub <noreply@github.com>2023-09-19 12:01:59 (GMT)
commit94c95d42a3b74729ee775f583fb7951f05d16c77 (patch)
tree1914282c26600522e7682e94becc198a70cfd0a0 /Lib/test/test_future_stmt/badsyntax_future.py
parent59f32a785fbce76a0fa02fe6d671813057714a0a (diff)
downloadcpython-94c95d42a3b74729ee775f583fb7951f05d16c77.zip
cpython-94c95d42a3b74729ee775f583fb7951f05d16c77.tar.gz
cpython-94c95d42a3b74729ee775f583fb7951f05d16c77.tar.bz2
gh-109485: Further improve `test_future_stmt` tests (#109486)
Add assertSyntaxError() which run tests with an additional docstring and without docstring, and checks for the error message.
Diffstat (limited to 'Lib/test/test_future_stmt/badsyntax_future.py')
-rw-r--r--Lib/test/test_future_stmt/badsyntax_future.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_future_stmt/badsyntax_future.py b/Lib/test/test_future_stmt/badsyntax_future.py
new file mode 100644
index 0000000..fa5ab67
--- /dev/null
+++ b/Lib/test/test_future_stmt/badsyntax_future.py
@@ -0,0 +1,3 @@
+from __future__ import absolute_import
+"spam, bar, blah"
+from __future__ import print_function