Mercurial > hg
diff tests/test-cbor.py @ 41549:1ea1bba1c5be
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 04 Feb 2019 14:05:26 -0800 |
parents | a9905045b992 |
children | 2372284d9457 |
line wrap: on
line diff
--- 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):