Guido van Rossum added the comment:

TBH the test structure is also rather fragile.  I need to think about it more; 
the global state to hold the current test instance smells, as do the various 
class-level functions (waitpid(), WIFEXITED() etc.) that aren't methods but 
used as mock functions.  The huge piles of mock.patch decorators should have 
tipped me off during the review, but I was more focused on the implementation 
instead of on the tests. :-(

The smallest fix to prevent one breaking test from breaking all following tests 
is just to remove the assert.  The next smallest fix is to use addCleanup() 
instead of tearDown() to reset ChildWatcherTestsMixin.instance.  The next fix 
would be huge (refactor the tests completely) and I don't want to go there.

Anthony, can you come up with a fix along the lines you suggested?  You can 
submit this to the Tulip repo first (let me review it).

----------

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

Reply via email to