diff --git a/python/plugins/__init__.py b/python/plugins/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/python/plugins/processing/__init__.py b/python/plugins/processing/__init__.py index 5f7045df49d8..8d48cfb07431 100644 --- a/python/plugins/processing/__init__.py +++ b/python/plugins/processing/__init__.py @@ -30,8 +30,6 @@ from processing.tools.vector import * from processing.tools.raster import * from processing.tools.system import * -from processing.tests.TestData import loadTestData - def classFactory(iface): from processing.ProcessingPlugin import ProcessingPlugin diff --git a/tests/src/python/plugins/processing/ParametersTest.py b/tests/src/python/plugins/processing/ParametersTest.py index ff597da106f0..2084d973cd22 100644 --- a/tests/src/python/plugins/processing/ParametersTest.py +++ b/tests/src/python/plugins/processing/ParametersTest.py @@ -25,11 +25,7 @@ __revision__ = '$Format:%H$' -from utilities import getQgisTestApp, unittest - -QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp() - -from plugins.processing.core import parameters +from utilities import unittest from plugins.processing.core.parameters import ParameterNumber from plugins.processing.core.parameters import ParameterCrs @@ -61,10 +57,15 @@ def testParameterExtent(self): assert not param.setValue('0,2,0') assert not param.setValue('0,2,0,a') assert param.setValue('0,2,2,4') - assert param.value == '0,2,2,4' + self.assertEqual(param.value, '0,2,2,4') assert param.setValue(None) - assert param.value == param.default, 'Result: {}, Expected: {}'.format(param.value, param.default) + self.assertEqual(param.value, None) + required = ParameterExtent('name', 'desc', optional=False) + first_value = '0,2,2,4' + assert required.setValue(first_value) + assert not required.setValue(None) + self.assertEqual(required.value, first_value) def suite(): suite = unittest.makeSuite(ParametersTest, 'test')