Code review comment for lp:~jtv/launchpad/recife-552639

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Hi Henning,

Thanks for the review. You were right: my change to that assertion text was lost somehow. Good thing you spotted that. Hope it's fixed this time.

> > === modified file 'lib/lp/translations/tests/test_translationmessage.py'
> > --- lib/lp/translations/tests/test_translationmessage.py 2009-08-25
> 20:15:38 +0000
> > +++ lib/lp/translations/tests/test_translationmessage.py 2010-06-19
> 03:38:37 +0000

> > """Unit tests for `TranslationMessage`."""
> > + def test_baseline(self):
> > + message = self.factory.makeTranslationMessage()
> > + verifyObject(ITranslationMessage, message)
>
> I'd have split this test here.

Good idea. I've been letting them grow longer so they'd waste less time on setup and teardown, sort of like our old doctests, but it's not always a good thing.

> > + def test_is_diverged(self):
> > + # ITranslationMessage.is_diverged is a little helper to let you
> > + # say "message.is_diverged" which can be clearer than
> > + # "message.potemplate is not None."
> > + message = self.factory.makeTranslationMessage(force_diverged=False)
> > + self.assertFalse(message.is_diverged)
> > +
>
> And this one here.

Both split now.

Jeroen

« Back to merge proposal