File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,9 @@ def test_run_all_tests(test_to_run, testdir):
8585 # protect against pycharm fiddling with the config
8686 from _pytest import config
8787 jb_prepareconfig = config ._prepareconfig
88-
89- _real_prepare_config = get_pytest_prepare_config ()
90-
91- def real_prepare_config (args = None , plugins = None ):
92- cfg_to_use = _real_prepare_config (args , plugins )
93- jb_config_results = jb_prepareconfig (None , None )
94- return cfg_to_use
95-
96- config ._prepareconfig = real_prepare_config
88+ if jb_prepareconfig .__module__ != config .get_config .__module__ :
89+ # we are in pycharm ! Fix that
90+ config ._prepareconfig = get_pytest_prepare_config ()
9791
9892 # run
9993 # first = testdir.runpytest("--collect-only", "-p", "no:cacheprovider") # ("-q")
You can’t perform that action at this time.
0 commit comments