mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
http://bugs.python.org/issue27364
This commit is contained in:
@@ -97,7 +97,7 @@ class ExtractorTests(POFileAssertionMixin, RunInTmpDirMixin, SimpleTestCase):
|
||||
self.fail("The token '%s' could not be found in %s, please check the test config" % (token, path))
|
||||
|
||||
def assertLocationCommentPresent(self, po_filename, line_number, *comment_parts):
|
||||
"""
|
||||
r"""
|
||||
self.assertLocationCommentPresent('django.po', 42, 'dirA', 'dirB', 'foo.py')
|
||||
|
||||
verifies that the django.po file has a gettext-style location comment of the form
|
||||
@@ -307,7 +307,7 @@ class BasicExtractorTests(ExtractorTests):
|
||||
self, str(ws[2].message),
|
||||
r"The translator-targeted comment 'Translators: ignored i18n "
|
||||
r"comment #4' \(file templates[/\\]comments.thtml, line 8\) "
|
||||
"was ignored, because it wasn't the last item on the line\."
|
||||
r"was ignored, because it wasn't the last item on the line\."
|
||||
)
|
||||
# Now test .po file contents
|
||||
self.assertTrue(os.path.exists(self.PO_FILE))
|
||||
|
||||
@@ -747,7 +747,7 @@ class FormattingTests(SimpleTestCase):
|
||||
self.maxDiff = 3000
|
||||
# Catalan locale
|
||||
with translation.override('ca', deactivate=True):
|
||||
self.assertEqual('j \d\e F \d\e Y', get_format('DATE_FORMAT'))
|
||||
self.assertEqual(r'j \d\e F \d\e Y', get_format('DATE_FORMAT'))
|
||||
self.assertEqual(1, get_format('FIRST_DAY_OF_WEEK'))
|
||||
self.assertEqual(',', get_format('DECIMAL_SEPARATOR'))
|
||||
self.assertEqual('10:15', time_format(self.t))
|
||||
|
||||
Reference in New Issue
Block a user