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
--- 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):