From dd324f13d1489b71365514f5521c464f02d9ef31 Mon Sep 17 00:00:00 2001 From: Karl Palmen <karl.palmen@stfc.ac.uk> Date: Wed, 23 Aug 2017 09:31:27 +0100 Subject: [PATCH] Test for the types re #20279 This required the types to be imported. The other tests did not require these imports. Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk> --- .../test/python/mantid/_plugins/ProductFunctionTest.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py b/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py index 87854d803db..901bf5f50a7 100644 --- a/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py +++ b/Framework/PythonInterface/test/python/mantid/_plugins/ProductFunctionTest.py @@ -5,11 +5,16 @@ import unittest from mantid.kernel import DateAndTime from mantid.api import EventType -from mantid.api import FunctionFactory -# from mantid._plugins import ProductFunction +from mantid.api import CompositeFunction, FunctionFactory +from mantid._plugins._curvefitting import ProductFunction class ProductFunctionTest(unittest.TestCase): + def test_type(self): + p = FunctionFactory.createFunction("ProductFunction") + self.assertTrue( isinstance(p,ProductFunction) ) + self.assertTrue( isinstance(p,CompositeFunction) ) + def test_length(self): p = FunctionFactory.createFunction("ProductFunction") self.assertEquals(len(p), 0) -- GitLab