def test_actor_parameter_names( self ): '''Check the parameters dictionary contains the correct names''' filepath = path.abspath(path.join(PATH_TO_SRC_DIR, 'scipysim','actors','math','trig','DTSinGenerator.py')) c = CodeFile( filepath ) # arguments should contain this: # self, out, amplitude=1.0, freq=0.01, phi=0.0, simulation_length=100 params = c.get_default_parameters() for name in ['out', 'amplitude', 'freq', 'phi', 'simulation_length']: self.assertTrue(name in params)
def test_actor_parameter_defaults(self): '''Check the parameters dictionary contains the correct default arguments''' filepath = path.abspath(path.join(PATH_TO_SRC_DIR, 'scipysim','actors','math','trig','DTSinGenerator.py')) c = CodeFile( filepath ) # arguments should contain this: # self, out, amplitude=1.0, freq=0.01, phi=0.0, simulation_length=100 params = c.get_default_parameters() for name, value in [('out', None), ('amplitude',1.0), ('freq',0.01), ('phi',0.0), ('simulation_length',100)]: self.assertEquals(params[name], value)