diff options
author | Eric V. Smith <ericvsmith@users.noreply.github.com> | 2017-12-06 19:00:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-06 19:00:34 (GMT) |
commit | 24e77f92658c7d258e2a3cf9868f3f4658932b40 (patch) | |
tree | 2233e838f20a9a78a1ae0432e140b4af924accdd | |
parent | 9d25bd11ca121cfc76e5bf31c265e72956208598 (diff) | |
download | cpython-24e77f92658c7d258e2a3cf9868f3f4658932b40.zip cpython-24e77f92658c7d258e2a3cf9868f3f4658932b40.tar.gz cpython-24e77f92658c7d258e2a3cf9868f3f4658932b40.tar.bz2 |
Use raw strings for regex to avoid invalid escape sequences. (GH-4741)
-rwxr-xr-x | Lib/test/test_dataclasses.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py index caea98a..9d08a2d 100755 --- a/Lib/test/test_dataclasses.py +++ b/Lib/test/test_dataclasses.py @@ -1831,7 +1831,7 @@ class TestCase(unittest.TestCase): # if we're also replacing one that does exist. Test this # here, because setting attributes on frozen instances is # handled slightly differently from non-frozen ones. - with self.assertRaisesRegex(TypeError, "__init__\(\) got an unexpected " + with self.assertRaisesRegex(TypeError, r"__init__\(\) got an unexpected " "keyword argument 'a'"): c1 = replace(c, x=20, a=5) @@ -1842,7 +1842,7 @@ class TestCase(unittest.TestCase): y: int c = C(1, 2) - with self.assertRaisesRegex(TypeError, "__init__\(\) got an unexpected " + with self.assertRaisesRegex(TypeError, r"__init__\(\) got an unexpected " "keyword argument 'z'"): c1 = replace(c, z=3) |