Since nose [doesn't allow](https://nose.readthedocs.org/en/latest/writing_tests.html#test-generators) you to generate unittests on a TestCase class with yield, I used [nose-parameterized](https://github.com/wolever/nose-parameterized) to do the test generation for me. The previous revision, however, keeps the original assert style but moves the tests to the module level so the test generation will work.