File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ def __init__(
7979 self .mp_conf_file .current_file = conf_filepath
8080 elif isinstance (settings , str ):
8181 self .mp_conf_file = MpConfigFile (file = settings )
82- self .mp_conf_file .load_from_file (file = settings )
8382 else :
8483 self .mp_conf_file = MpConfigFile ()
8584 self .mp_conf_file .load_default ()
Original file line number Diff line number Diff line change @@ -140,9 +140,10 @@ def test_mp_edit_load_params():
140140 for key in orig_settings .keys ():
141141 check .equal (orig_settings [key ], mp_conf .mp_controls .mp_config [key ])
142142
143- # Test no existing MPConfig
143+ # Test invalid file in MPConfig env and with file parameter.
144+ # should load without exception
144145 with custom_mp_config (str (config_path )):
145146 os .environ ["MSTICPYCONFIG" ] = "./invalid_file.yaml"
146- with pytest . raises ( ValueError ):
147- with pytest . warns ( UserWarning ):
148- mp_conf = MpConfigEdit ()
147+ mp_conf = MpConfigEdit ()
148+
149+ mp_conf = MpConfigEdit (settings = "./invalid_file.yaml" )
You can’t perform that action at this time.
0 commit comments