Re: Using unitest or doc test with complex output

2007-09-19 Thread Russell Keith-Magee
On 9/20/07, cesco <[EMAIL PROTECTED]> wrote: > > Thanks for the clarification. > > Basically the view I was trying to test returns a list of list of > querysets and, for some combination of parameters, the queryset is > empty, that is, it returns a list containing an empty list. Shouldn't > the co

Re: Using unitest or doc test with complex output

2007-09-19 Thread cesco
Thanks for the clarification. I understand now the problem regarding doctests and the comparison of the same objects. The thing I'm still missing is how can the test fail when I'm comparing a list containing an empty list with a list containing an empty list as well. No model object is involved i

Re: Using unitest or doc test with complex output

2007-09-19 Thread Russell Keith-Magee
On 9/20/07, cesco <[EMAIL PROTECTED]> wrote: > > Hi, > > I'd like to test a query and the data returned by that query is a list > containing a list of objects. For example: > [[, , ..., ]] > > If I try testing using unittests I get the following error: > AssertionError: [[]] != [[]] > though to me

Using unitest or doc test with complex output

2007-09-19 Thread cesco
Hi, I'd like to test a query and the data returned by that query is a list containing a list of objects. For example: [[, , ..., ]] If I try testing using unittests I get the following error: AssertionError: [[]] != [[]] though to me the expected output and the one I get look identical. If I tr