@@ -1132,7 +1132,11 @@ def _get_override_ini_value(self, name: str) -> Optional[str]:
11321132 try :
11331133 key , user_ini_value = ini_config .split ("=" , 1 )
11341134 except ValueError :
1135- raise UsageError ("-o/--override-ini expects option=value style." )
1135+ raise UsageError (
1136+ "-o/--override-ini expects option=value style (got: {!r})." .format (
1137+ ini_config
1138+ )
1139+ )
11361140 else :
11371141 if key == name :
11381142 value = user_ini_value
@@ -1198,28 +1202,6 @@ def _warn_about_missing_assertion(mode):
11981202 )
11991203
12001204
1201- def setns (obj , dic ):
1202- import pytest
1203-
1204- for name , value in dic .items ():
1205- if isinstance (value , dict ):
1206- mod = getattr (obj , name , None )
1207- if mod is None :
1208- modname = "pytest.%s" % name
1209- mod = types .ModuleType (modname )
1210- sys .modules [modname ] = mod
1211- mod .__all__ = []
1212- setattr (obj , name , mod )
1213- obj .__all__ .append (name )
1214- setns (mod , value )
1215- else :
1216- setattr (obj , name , value )
1217- obj .__all__ .append (name )
1218- # if obj != pytest:
1219- # pytest.__all__.append(name)
1220- setattr (pytest , name , value )
1221-
1222-
12231205def create_terminal_writer (config : Config , * args , ** kwargs ) -> TerminalWriter :
12241206 """Create a TerminalWriter instance configured according to the options
12251207 in the config object. Every code which requires a TerminalWriter object
0 commit comments