Skip to content

Commit 4b431d2

Browse files
authored
gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (#105940)
Co-authored-by: @sunmy2019
1 parent 6586cee commit 4b431d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_fstring.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def __format__(self, format_spec):
773773
self.assertEqual(f'{CustomFormat():\n}', '\n')
774774
self.assertEqual(f'{CustomFormat():\u2603}', '☃')
775775
with self.assertWarns(SyntaxWarning):
776-
exec('f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat})
776+
exec(r'f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat})
777777

778778
def test_side_effect_order(self):
779779
class X:

0 commit comments

Comments
 (0)