nose also looks for __name__, however, you quickly run into scoping
issues if you try to set that in a generator. Nose will however use
the arguments sent to your method as part of the name which you can
use to make more readable tests. For example:
class TestA:
def _test(self, type):
pass
def test_many(self):
for t in ['foo','bar','fooz']:
yield (self._test,t)
$ nosetests -v
test_a.TestA.test_many('foo',) ... ok
test_a.TestA.test_many('bar',) ... ok
test_a.TestA.test_many('fooz',) ... ok
----------------------------------------------------------------------
Ran 3 tests in 0.006s
OK