[issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests)

Guido van Rossum report at bugs.python.org
Wed Nov 13 19:59:20 CET 2013


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 <report at bugs.python.org>
<http://bugs.python.org/issue19566>
_______________________________________


More information about the Python-bugs-list mailing list