From 485e056ff913cc9501a48b49c7cebb831041a13a Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Thu, 11 Jan 2024 08:06:09 +0200 Subject: [PATCH] gh-113932: Suppress SyntaxWarning in test_compile.TestSpecifics.test_condition_expression_with_redundant_comparisons_compiles --- Lib/test/test_compile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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("""