@@ -878,7 +878,7 @@ def cwd_relative_nodeid(self, nodeid):
878
878
def fromdictargs (cls , option_dict , args ):
879
879
""" constructor useable for subprocesses. """
880
880
config = get_config ()
881
- config ._preparse (args , addopts = False )
881
+ config .parse (args , addopts = False )
882
882
config .option .__dict__ .update (option_dict )
883
883
for x in config .option .plugins :
884
884
config .pluginmanager .consider_pluginarg (x )
@@ -946,14 +946,14 @@ def _checkversion(self):
946
946
self .inicfg .config .path , self .inicfg .lineof ('minversion' ),
947
947
minver , pytest .__version__ ))
948
948
949
- def parse (self , args ):
949
+ def parse (self , args , addopts = True ):
950
950
# parse given cmdline arguments into this config object.
951
951
assert not hasattr (self , 'args' ), (
952
952
"can only parse cmdline args at most once per Config object" )
953
953
self ._origargs = args
954
954
self .hook .pytest_addhooks .call_historic (
955
955
kwargs = dict (pluginmanager = self .pluginmanager ))
956
- self ._preparse (args )
956
+ self ._preparse (args , addopts = addopts )
957
957
# XXX deprecated hook:
958
958
self .hook .pytest_cmdline_preparse (config = self , args = args )
959
959
args = self ._parser .parse_setoption (args , self .option )
0 commit comments