summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-20 13:16:21 (GMT)
committerGitHub <noreply@github.com>2023-06-20 13:16:21 (GMT)
commit164fa930011c46d3261538c17f8c4ffbeedc0f7e (patch)
treed1c9d08397a44245f3b0d25a5edbc3283ff24faf /Lib/test
parentfea0d2fbaae69d95549891678339a67549a57e38 (diff)
downloadcpython-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.py2
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: