diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index fb3d5ad970fba5..b6082cf02b18d7 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -1478,7 +1478,7 @@ class MoreColor(Color): class EvenMoreColor(Color, IntEnum): chartruese = 7 # - with self.assertRaisesRegex(ValueError, "\(.Foo., \(.pink., .black.\)\) is not a valid .*Color"): + with self.assertRaisesRegex(ValueError, r"\(.Foo., \(.pink., .black.\)\) is not a valid .*Color"): Color('Foo', ('pink', 'black')) def test_exclude_methods(self):