Only monkeypatch xunit when the tests are run using it.

This commit is contained in:
Thomas Kluyver 2012-02-13 23:17:05 +00:00
parent c926a2872c
commit 7d849a2f70

View File

@ -407,7 +407,7 @@ def run_iptest():
and accepts all of the standard nose arguments.
"""
# Apply our monkeypatch to Xunit
if not hasattr(Xunit, 'orig_addError'):
if '--with-xunit' in sys.argv and not hasattr(Xunit, 'orig_addError'):
monkeypatch_xunit()
warnings.filterwarnings('ignore',