R. David Murray added the comment:

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.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15551>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to