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', '', 'exec') + with self.assertWarns(SyntaxWarning): + compile('if 9<9<9and 9or 9:9', '', 'exec') def test_dead_code_with_except_handler_compiles(self): compile(textwrap.dedent("""