bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

No need for ErrorClassPlugin to keep original methods when monkey patching result #472

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In nose.plugins.errorclass.ErrorClassPlugin.patchResult, we monkey patch a 
non-standard TestResult instance so that it emulates the error handling 
functionality of Nose's TextTestResult.

When we do this, we store the original methods on the result instance, named 
(for example) _orig_addError. We also have a couple of unit tests (in 
test_skip_plugin and test_deprecated_plugin) to verify that these original 
methods exist.

My question is, why do we do this? They do not appear to be used (apart from 
the unit tests), and creating them makes ErrorClassPlugin harder to understand.

Original issue reported on code.google.com by gazi...@gmail.com on 24 Nov 2011 at 6:57

GoogleCodeExporter commented 8 years ago
I have a patch in my cloned repository, at:
http://code.google.com/r/gazimon-nose/source/list?name=issue-472

Original comment by gazi...@gmail.com on 29 Nov 2011 at 1:00