Example #1
0
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"
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 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)