Skip to content

Commit

Permalink
Change test to catch DepreationWarnings for invalid escape seq
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical committed Mar 25, 2023
1 parent c80b292 commit 1f47ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_fstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def test_backslashes_in_string_part(self):
self.assertEqual(f'2\x203', '2 3')
self.assertEqual(f'\x203', ' 3')

with self.assertWarns(SyntaxWarning): # invalid escape sequence
with self.assertWarns(DeprecationWarning): # invalid escape sequence
value = eval(r"f'\{6*7}'")
self.assertEqual(value, '\\42')
self.assertEqual(f'\\{6*7}', '\\42')
Expand Down

0 comments on commit 1f47ba8

Please sign in to comment.