diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 16d86bb..02c1a8e 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -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',