(a) exec( "import %s" % script ) module = locals()[script] # if this module supports our testing interface if module.__dict__.has_key( "addTests" ): module.addTests( ts ) (b) def addTests( ts ): ts.add( BigIntegerTest( "BigIntegerTest" ) )