def test_set_model_autoassign_func_type(): with pytest.raises(ArgumentTypeErr) as te: ui.set_model_autoassign_func(23) assert str( te.value) == "'func' must be a function or other callable object"
def run_thread(self, name, scriptname='fit.py'): ui.clean() ui.set_model_autoassign_func(self.assign_model) self.locals = {} cwd = os.getcwd() os.chdir(self.make_path('ciao4.3', name)) try: execfile(scriptname, {}, self.locals) finally: os.chdir(cwd)
def run_thread(self, name, scriptname='fit.py'): ui.clean() ui.set_model_autoassign_func(self.assign_model) super(test_new_templates_ui, self).run_thread(name, scriptname=scriptname)
def run_thread(self, name, scriptname='fit.py'): ui.clean() ui.set_model_autoassign_func(self.assign_model) self.locals = {} os.chdir(os.path.join(self.datadir, 'ciao4.3', name)) execfile(scriptname, {}, self.locals)