This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Jason.Baker, alex, ezio.melotti, michael.foord, r.david.murray
Date 2012-08-04.21:54:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344117279.58.0.680475433791.issue15551@psf.upfronthosting.co.za>
In-reply-to
Content
This is not something that is specific to unittest.  In Python, if you call a generator function *it returns a generator-iterator*.  Unless you *do* something with the the iterator, nothing else happens.  This is true in *any* python code.  

Unittest calls whatever test method you define, and handles (reports) the exceptions that result from that call.  That's the fundamental design of unittest.  Your generator test method does not raise any exceptions when called, therefore the test passed.
History
Date User Action Args
2012-08-04 21:54:39r.david.murraysetrecipients: + r.david.murray, ezio.melotti, alex, michael.foord, Jason.Baker
2012-08-04 21:54:39r.david.murraysetmessageid: <1344117279.58.0.680475433791.issue15551@psf.upfronthosting.co.za>
2012-08-04 21:54:38r.david.murraylinkissue15551 messages
2012-08-04 21:54:38r.david.murraycreate