Code review comment for lp:~henninge/launchpad/recife-611668-fix-tests

Revision history for this message
j.c.sackett (jcsackett) wrote :

Henning--

The changes in the branch look fine, but I have a concern--the tests you listed explicitly pass both before and after your branch was merged and sample data was updated. Is there a prereg not listed for this branch?

> === modified file 'lib/lp/translations/doc/pofile.txt'
> --- lib/lp/translations/doc/pofile.txt 2010-12-09 16:36:43 +0000
> +++ lib/lp/translations/doc/pofile.txt 2010-12-09 16:36:44 +0000
> @@ -661,17 +661,17 @@
> ... for potmsgset in potmsgsets:
> ... translationmessage = potmsgset.getCurrentTranslationMessage(
> ... pofile.potemplate, pofile.language)
> + ... msgid = potmsgset.msgid_singular.msgid
> + ... if len(msgid) > 10:
> + ... msgid = msgid[:7] + '...'
> ... for index in range(len(translationmessage.translations)):
> - ... msgid = potmsgset.msgid_singular.msgid
> - ... if len(msgid) > 10:
> - ... msgid = msgid[:7] + '...'
> ... if translationmessage.translations[index] is None:
> ... translation = 'None'
> ... else:
> ... translation = translationmessage.translations[index]
> ... if len(translation) > 10:
> ... translation = translation[:7] + '...'
> - ... print "%-10s %-5s %-10s %-11s" % (
> + ... print "%-10s %-5s %-10s %s" % (
> ... msgid, index, translation,
> ... potmsgset.msgid_plural is not None)

I'm a big fan of these changes; I'm not really sure how the previous string format was working. %s is definitely appropriate for a boolean. And as I questioned, it turns out it does just slightly seem to speed up the doctest.

review: Needs Information (code*)

« Back to merge proposal