def test_same_params(self): m_def = [ self.widget.preprocessormodel.item(i) for i in range(self.widget.preprocessormodel.rowCount()) ] ed_model, ed_params = create_composite_model(m_def) self.assertEqual(self.model.name, ed_model.name) self.assertEqual(set(self.params), set(ed_params)) for k, v in self.params.items(): self.assertEqual(v, ed_params[k])
def test_saving_model_params(self): model, params = self.matched_models() settings = self.widget.settingsHandler.pack_data(self.widget) self.widget = self.create_widget(OWPeakFit, stored_settings=settings) m_def = [ self.widget.preprocessormodel.item(i) for i in range(self.widget.preprocessormodel.rowCount()) ] sv_model, sv_params = create_composite_model(m_def) self.assertEqual(model.name, sv_model.name) self.assertEqual(set(params), set(sv_params))