@@ -208,6 +208,8 @@ def _is_numpy_ufunc(method):
208
208
def pytest_configure (config ):
209
209
doctest_plugin = config .pluginmanager .getplugin ('doctest' )
210
210
run_regular_doctest = config .option .doctestmodules and not config .option .doctest_plus
211
+ if config .option .doctest_plus_generate_diff :
212
+ config .option .doctest_only = True
211
213
use_doctest_plus = config .getini (
212
214
'doctest_plus' ) or config .option .doctest_plus or config .option .doctest_only
213
215
use_doctest_ufunc = config .getini (
@@ -890,13 +892,15 @@ def __init__(self, checker=None, verbose=None, optionflags=0,
890
892
891
893
def report_success (self , out , test , example , got ):
892
894
if self ._generate_diff :
893
- return self .track_diff (True , out , test , example , got )
895
+ self .track_diff (False , out , test , example , got )
896
+ return
894
897
895
898
return super ().report_success (out , test , example , got )
896
899
897
900
def report_failure (self , out , test , example , got ):
898
901
if self ._generate_diff :
899
- self .track_diff (False , out , test , example , got )
902
+ self .track_diff (True , out , test , example , got )
903
+ return
900
904
901
905
failure = doctest .DocTestFailure (test , example , got )
902
906
if self .continue_on_failure :
0 commit comments