def test_function_subscription_without_required_attrs_fails(self): self.assertRaises(RuntimeError, FunctionFactory.Instance().subscribe, TestFunctionNoAttrs) self.assertTrue( "TestFunctionNoAttrs" not in FunctionFactory.getFunctionNames()) self.assertRaises(RuntimeError, FunctionFactory.Instance().subscribe, TestFunctionOnlyInit) self.assertTrue( "TestFunctionOnlyInit" not in FunctionFactory.getFunctionNames())
def add_items_to_combo_boxes(self): fun_factory = FunctionFactory.Instance() self.view.auto_bkg.addItem("None") for name in fun_factory.getBackgroundFunctionNames(): self.view.auto_bkg.addItem(name) for name in fun_factory.getPeakFunctionNames(): self.view.default_peak.addItem(name)