mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (#105940)
Co-authored-by: @sunmy2019
This commit is contained in:
parent
6586cee27f
commit
4b431d2e90
1 changed files with 1 additions and 1 deletions
|
|
@ -773,7 +773,7 @@ x = (
|
||||||
self.assertEqual(f'{CustomFormat():\n}', '\n')
|
self.assertEqual(f'{CustomFormat():\n}', '\n')
|
||||||
self.assertEqual(f'{CustomFormat():\u2603}', '☃')
|
self.assertEqual(f'{CustomFormat():\u2603}', '☃')
|
||||||
with self.assertWarns(SyntaxWarning):
|
with self.assertWarns(SyntaxWarning):
|
||||||
exec('f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat})
|
exec(r'f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat})
|
||||||
|
|
||||||
def test_side_effect_order(self):
|
def test_side_effect_order(self):
|
||||||
class X:
|
class X:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue