← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:py3-confusing-string-literal into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-confusing-string-literal into launchpad:master.

Commit message:
Fix confusing string literal in TranslationFormatSyntaxErrorTest

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/397922

In Python 2 without unicode_literals, "\u0e02" == "\\u0e02", but this is a confusing spelling and changes meaning surprisingly in Python 3.  Make it clearer what we mean.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-confusing-string-literal into launchpad:master.
diff --git a/lib/lp/translations/utilities/tests/test_syntax_errors.py b/lib/lp/translations/utilities/tests/test_syntax_errors.py
index a7696de..9273f5a 100644
--- a/lib/lp/translations/utilities/tests/test_syntax_errors.py
+++ b/lib/lp/translations/utilities/tests/test_syntax_errors.py
@@ -81,7 +81,7 @@ class TranslationFormatSyntaxErrorTest(TestCase):
         exception = TranslationFormatSyntaxError(filename=u"khor-khai-\u0e01",
             line_number=4, message=u"khor-khai-\u0e02")
         self.assertEqual(str(exception),
-            "khor-khai-\\u0e01, line 4: khor-khai-\u0e02")
+            "khor-khai-\\u0e01, line 4: khor-khai-\\u0e02")
 
 
 def test_suite():