]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113932: assert ``SyntaxWarning`` in test_compile.TestSpecifics.test_… (#113933)
authorKirill Podoprigora <kirill.bast9@mail.ru>
Thu, 11 Jan 2024 11:25:07 +0000 (14:25 +0300)
committerGitHub <noreply@github.com>
Thu, 11 Jan 2024 11:25:07 +0000 (11:25 +0000)
Lib/test/test_compile.py

index 7850977428985f7561a4e976afdaecc3c5e80298..45fd30987760cb6c4527de53969c0ef8d9c214a9 100644 (file)
@@ -450,7 +450,8 @@ class TestSpecifics(unittest.TestCase):
 
     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("""