File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -420,6 +420,23 @@ def testLoadConfig(self):
420420 self .assertEqual (config [('web' ,'cookie_takes_precedence' )], 0 )
421421
422422
423+ def testLoadConfigNoConfig (self ):
424+ """ run load on a directory missing config.ini """
425+
426+ c = os .path .join (self .dirname , configuration .Config .INI_FILE )
427+ if os .path .exists (c ):
428+ os .remove (c )
429+ else :
430+ self .assertFalse ("setup failed missing config.ini" )
431+
432+ config = configuration .CoreConfig ()
433+
434+ with self .assertRaises (configuration .NoConfigError ) as cm :
435+ config .load (self .dirname )
436+
437+ print (cm .exception )
438+ self .assertEqual (cm .exception .args [0 ], self .dirname )
439+
423440 def testInvalidIndexerValue (self ):
424441 """ Mistype native indexer. Verify exception is
425442 generated.
You can’t perform that action at this time.
0 commit comments