[TIP] Which is the proper way to test an "unordered list"
Michael Rene Armida
me at marmida.com
Thu May 17 00:10:59 PDT 2012
I find that sets are sufficient for this purpose, so your original:
> > assert a_transition.next_states == ["a state","another state"]
>
Would become:
assert set(a_transition.next_states) == set(["a state","another state"])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20120517/ba9639ca/attachment.htm>
More information about the testing-in-python
mailing list