From ee41f3e6ebe7cb3c44554a4015e8d687e01c3cbd Mon Sep 17 00:00:00 2001 From: Lysandros Nikolaou Date: Tue, 20 Jun 2023 14:15:27 +0200 Subject: [PATCH] gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring Co-authored-by: @sunmy2019 --- Lib/test/test_fstring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 8f6b576b5f785f..325b25db4678d2 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -772,7 +772,7 @@ def __format__(self, format_spec): 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: