https://github.com/python/cpython/commit/9f088336b268dfe9011a7cb550f4e488ccd7e8f5
commit: 9f088336b268dfe9011a7cb550f4e488ccd7e8f5
branch: main
author: Kirill Podoprigora <[email protected]>
committer: iritkatriel <[email protected]>
date: 2024-01-11T11:25:07Z
summary:

gh-113932: assert ``SyntaxWarning`` in test_compile.TestSpecifics.test_… 
(#113933)

files:
M Lib/test/test_compile.py

diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 7850977428985f..45fd30987760cb 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -450,7 +450,8 @@ def 
test_condition_expression_with_dead_blocks_compiles(self):
 
     def test_condition_expression_with_redundant_comparisons_compiles(self):
         # See gh-113054
-        compile('if 9<9<9and 9or 9:9', '<eval>', 'exec')
+        with self.assertWarns(SyntaxWarning):
+            compile('if 9<9<9and 9or 9:9', '<eval>', 'exec')
 
     def test_dead_code_with_except_handler_compiles(self):
         compile(textwrap.dedent("""

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to