diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2023-06-20 12:49:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 12:49:00 (GMT) |
commit | 4b431d2e90bf5760a57aa40af2dd78e7bbf0b1ae (patch) | |
tree | 04a3537bab0b1fd61f9027e9e4c9703b4d198410 /Lib | |
parent | 6586cee27f32f0354fe4e77c7b8c6e399329b5e2 (diff) | |
download | cpython-4b431d2e90bf5760a57aa40af2dd78e7bbf0b1ae.zip cpython-4b431d2e90bf5760a57aa40af2dd78e7bbf0b1ae.tar.gz cpython-4b431d2e90bf5760a57aa40af2dd78e7bbf0b1ae.tar.bz2 |
gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (#105940)
Co-authored-by: @sunmy2019
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_fstring.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index ad5ac6a..1eb3bfb 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -773,7 +773,7 @@ x = ( self.assertEqual(f'{CustomFormat():\n}', '\n') self.assertEqual(f'{CustomFormat():\u2603}', '☃') with self.assertWarns(SyntaxWarning): - exec('f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat}) + exec(r'f"{F():¯\_(ツ)_/¯}"', {'F': CustomFormat}) def test_side_effect_order(self): class X: |