Unit testing a function that returns a generator object
<p>The title pretty much sums it up: I tried to use assertEqual to test a function that returns a generator object, but that results in:</p>

<blockquote>
  <p>AssertionError: generator object genexpr> at 0x2e70c80> != (1,2,...)</p>
</blockquote>

<p>Is there a clever way to do this other than iterating over the function and running assertEqual for each individual output?</p>
