Ejemplo n.º 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"
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)