8000 gh-113932: assert ``SyntaxWarning`` in test_compile.TestSpecifics.tes… · python/cpython@9f08833 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f08833

Browse files
authored
gh-113932: assert SyntaxWarning in test_compile.TestSpecifics.test_… (#113933)
1 parent ec23e90 commit 9f08833

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_compile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,8 @@ def test_condition_expression_with_dead_blocks_compiles(self):
450450

451451
def test_condition_expression_with_redundant_comparisons_compiles(self):
452452
# See gh-113054
453-
compile('if 9<9<9and 9or 9:9', '<eval>', 'exec')
453+
with self.assertWarns(SyntaxWarning):
454+
compile('if 9<9<9and 9or 9:9', '<eval>', 'exec')
454455

455456
def test_dead_code_with_except_handler_compiles(self):
456457
compile(textwrap.dedent("""

0 commit comments

Comments
 (0)
0