[MERGE] Slight test suite refactorings

Martin Pool mbp at sourcefrog.net
Tue Apr 1 09:53:01 BST 2008

On Tue, Apr 1, 2008 at 6:09 PM, Vincent Ladeuil <v.ladeuil+lp at free.fr> wrote:
>     martin> +        self.assertEqual(set(_test_ids(self.suite)),
>     martin> +                         set(_test_ids(randomized_suite)))
>     martin> In passing, I would probably write this as comparing sorted(x),
>     martin> sorted(y).  I realize it's not your original code.
>  We are comparing sets, why do you want to sort lists and compare
>  them ? Easier to read ?

It looked like you were trying to compare two lists without regard to
order.  (I'm pretty sure they're not sets already?)  If you sort them
it gives a slightly easier output if the test fails.  Not a big deal
at all.

Martin <http://launchpad.net/~mbp/>

More information about the bazaar mailing list