File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,19 @@ def test_merge_api_toml_config(self):
178178 assert main .config ['foo' ] == {'nval' : 33 }
179179 assert main .config ['task:bar' ] == {'opt' : "baz" }
180180
181+ def test_merge_api_toml_config_with_prefix (self ):
182+ config_filename = os .path .join (os .path .dirname (__file__ ), 'sample_with_prefix.toml' )
183+ main = doit_cmd .DoitMain (config_filenames = config_filename ,
184+ toml_config_files_prefix = "tool.doit" )
185+ assert 1 == len (main .config ['COMMAND' ])
186+ # test loaded plugin command is actually used with plugin name
187+ assert 'foo' in main .get_cmds ()
188+ # INI has higher preference the api_config
189+ assert main .config ['GLOBAL' ] == {'optx' :'6' , 'opty' :'7' }
190+
191+ assert main .config ['foo' ] == {'nval' : 33 }
192+ assert main .config ['task:bar' ] == {'opt' : "baz" }
193+
181194
182195 def test_find_pyproject_toml_config (self ):
183196 config_filename = os .path .join (os .path .dirname (__file__ ), 'pyproject.toml' )
You can’t perform that action at this time.
0 commit comments