Made test for issue 19552 compatible with Windows.
Take in account platform path separator. Refs #19552.
This commit is contained in:
parent
0f46ec315e
commit
651bed0918
|
@ -206,13 +206,13 @@ class BasicExtractorTests(ExtractorTests):
|
||||||
for w in ws:
|
for w in ws:
|
||||||
self.assertTrue(issubclass(w.category, TranslatorCommentWarning))
|
self.assertTrue(issubclass(w.category, TranslatorCommentWarning))
|
||||||
six.assertRegex(self, str(ws[0].message),
|
six.assertRegex(self, str(ws[0].message),
|
||||||
r"The translator-targeted comment 'Translators: ignored i18n comment #1' \(file templates/comments.thtml, line 4\) was ignored, because it wasn't the last item on the line\."
|
r"The translator-targeted comment 'Translators: ignored i18n comment #1' \(file templates[/\\]comments.thtml, line 4\) was ignored, because it wasn't the last item on the line\."
|
||||||
)
|
)
|
||||||
six.assertRegex(self, str(ws[1].message),
|
six.assertRegex(self, str(ws[1].message),
|
||||||
r"The translator-targeted comment 'Translators: ignored i18n comment #3' \(file templates/comments.thtml, line 6\) was ignored, because it wasn't the last item on the line\."
|
r"The translator-targeted comment 'Translators: ignored i18n comment #3' \(file templates[/\\]comments.thtml, line 6\) was ignored, because it wasn't the last item on the line\."
|
||||||
)
|
)
|
||||||
six.assertRegex(self, str(ws[2].message),
|
six.assertRegex(self, str(ws[2].message),
|
||||||
r"The translator-targeted comment 'Translators: ignored i18n comment #4' \(file templates/comments.thtml, line 8\) was ignored, because it wasn't the last item on the line\."
|
r"The translator-targeted comment 'Translators: ignored i18n comment #4' \(file templates[/\\]comments.thtml, line 8\) was ignored, because it wasn't the last item on the line\."
|
||||||
)
|
)
|
||||||
# Now test .po file contents
|
# Now test .po file contents
|
||||||
self.assertTrue(os.path.exists(self.PO_FILE))
|
self.assertTrue(os.path.exists(self.PO_FILE))
|
||||||
|
|
Loading…
Reference in New Issue