mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
This commit is contained in:
parent
17677d510f
commit
8119b679eb
42 changed files with 82 additions and 82 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue