fandango.test.testmodule module¶
- class fandango.test.testmodule.TestModule(module, tests={})[source]¶
Bases: fandango.objects.Object
The TestModule allows generic testing of modules and classes.
Specific tests will be setup using the __test__ dictionary declared on each module.
on __init__.py : __test__ = [‘submodule’,’submodule2’] on submodule.py :
__test__ = {‘method1’:[result,callable,callable],’method2’:[result,args,kwargs]} __test__[‘kmap’] = [
{‘args’:[str.lower,’BCA’,’YZX’,False], ‘result’:[(‘A’, ‘x’), (‘B’, ‘y’), (‘C’, ‘z’)]} ]aliases = {‘hdb’:’PyTangoArchiving.ArchivingAPI’} tests = {} tests[‘module.class.method’] = [
(args,kwargs,result or None), (args,kwargs,result or None), ...]tests[‘PyTangoArchiving.ArchivingAPI’] = [(None,[‘hdb’],{‘load’:False})]}
tc = TestModule(‘PyTangoArchiving’,tests) tc.test()
- class fandango.test.testmodule.TestModuleSet(module, include=[], exclude=[])[source]¶
Bases: fandango.test.testmodule.TestModule
Class that allows filtered testing on python Modules