[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

Terry J. Reedy report at bugs.python.org
Wed Aug 10 19:42:51 EDT 2016


Terry J. Reedy added the comment:

The issue with test_textview in 3.x is that tearDownModule deleted a module attribute, 'TV', that was not created in setUpModule.  For 2.7, 'TV' is a class attribute that is created in setUpClass and deleted in tearDownClass, so it does not have the same problem.  On the other hand, 'TV' is the original textView.TextViewer class, as modified with mocks in setUpClass.  The modifications are not reverted in tearDownClass.  This is the original code, later modified in 3.x.  This is safe both for re-runs and likely future tests, but this is not immediately obvious.  In any case, it violates the idea/rule that tests should not make permanent changes.  So I backported the local subclass of TextViewer used in 3.x.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27714>
_______________________________________


More information about the Python-bugs-list mailing list