diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-20 13:16:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 13:16:21 (GMT) |
commit | 164fa930011c46d3261538c17f8c4ffbeedc0f7e (patch) | |
tree | d1c9d08397a44245f3b0d25a5edbc3283ff24faf /Lib/test | |
parent | fea0d2fbaae69d95549891678339a67549a57e38 (diff) | |
download | cpython-164fa930011c46d3261538c17f8c4ffbeedc0f7e.zip cpython-164fa930011c46d3261538c17f8c4ffbeedc0f7e.tar.gz cpython-164fa930011c46d3261538c17f8c4ffbeedc0f7e.tar.bz2 |
[3.12] gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (GH-105940) (#105942)
(cherry picked from commit 4b431d2e90bf5760a57aa40af2dd78e7bbf0b1ae)
Co-authored-by: @sunmy2019
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Diffstat (limited to 'Lib/test')
-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: |