Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.

http://bugs.python.org/issue27364
This commit is contained in:
Tim Graham 2016-09-16 12:15:00 -04:00
parent 17677d510f
commit 8119b679eb
42 changed files with 82 additions and 82 deletions

View file

@ -48,8 +48,8 @@ class RegexFieldTest(SimpleTestCase):
f.clean('123')
six.assertRaisesRegex(
self, ValidationError,
"'Ensure this value has at least 5 characters \(it has 3\)\.',"
" u?'Enter a valid value\.'",
r"'Ensure this value has at least 5 characters \(it has 3\)\.',"
r" u?'Enter a valid value\.'",
f.clean, 'abc'
)
self.assertEqual('12345', f.clean('12345'))
@ -60,7 +60,7 @@ class RegexFieldTest(SimpleTestCase):
f.clean('12345a')
def test_regexfield_unicode_characters(self):
f = RegexField('^\w+$')
f = RegexField(r'^\w+$')
self.assertEqual('éèøçÎÎ你好', f.clean('éèøçÎÎ你好'))
def test_change_regex_after_init(self):