# HG changeset patch # User Gregory Szorc # Date 1549317926 28800 # Node ID 1ea1bba1c5be51f14d8017ba62ac0f6dd45e2f41 # Parent 6dae1f31c6c94f26fc906566b5107080af60b91e tests: use raw strings in test-cbor.py To avoid SyntaxWarning on Python 3.8 due to invalid \ escape. Differential Revision: https://phab.mercurial-scm.org/D5839 diff -r 6dae1f31c6c9 -r 1ea1bba1c5be tests/test-cbor.py --- a/tests/test-cbor.py Mon Feb 04 14:03:15 2019 -0800 +++ b/tests/test-cbor.py Mon Feb 04 14:05:26 2019 -0800 @@ -926,7 +926,7 @@ (False, None, -1, cborutil.SPECIAL_NONE)) with self.assertRaisesRegex(cborutil.CBORDecodeError, - 'semantic tag \d+ not allowed'): + r'semantic tag \d+ not allowed'): cborutil.decodeitem(encoded) class SpecialTypesTests(TestCase): @@ -942,7 +942,7 @@ encoded = cborutil.encodelength(cborutil.MAJOR_TYPE_SPECIAL, i) with self.assertRaisesRegex(cborutil.CBORDecodeError, - 'special type \d+ not allowed'): + r'special type \d+ not allowed'): cborutil.decodeitem(encoded) class SansIODecoderTests(TestCase):