Test TracLegos class and associated functions ============================================= The imports: >>> from pprint import pprint >>> from traclegos.legos import sections >>> from traclegos.legos import site_configuration >>> from traclegos.legos import traclegos_argspec >>> from traclegos.legos import TracLegos Test the constructor argument specification. This will have to be changed if TracLegos.__init__ is changed: >>> sorted(TracLegos.arguments().keys()) ['directory', 'inherit', 'master', 'options', 'site_templates', 'vars'] traclegos_argspec should use the left-most non-false value of a list of dictionaries to provide the arugments to construct TracLegos: >>> print repr(traclegos_argspec()['directory']) None >>> traclegos_argspec({'directory': 'foo'}, {'directory': 'bar'})['directory'] 'bar' >>> traclegos_argspec({'directory': 'foo'}, {'directory': None})['directory'] 'foo' site_configuration should return a dictionary for every section supported by site-configuration .ini files. In the case where no arguments are passed, these should be empty dictionaries: >>> set(site_configuration().keys()) == sections True