|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | + |
| 3 | +""" |
| 4 | +*************************************************************************** |
| 5 | + ParametersTest |
| 6 | + --------------------- |
| 7 | + Date : August 2017 |
| 8 | + Copyright : (C) 2017 by Nyall Dawson |
| 9 | + Email : nyall dot dawson at gmail dot com |
| 10 | +*************************************************************************** |
| 11 | +* * |
| 12 | +* This program is free software; you can redistribute it and/or modify * |
| 13 | +* it under the terms of the GNU General Public License as published by * |
| 14 | +* the Free Software Foundation; either version 2 of the License, or * |
| 15 | +* (at your option) any later version. * |
| 16 | +* * |
| 17 | +*************************************************************************** |
| 18 | +""" |
| 19 | + |
| 20 | +__author__ = 'Nyall Dawson' |
| 21 | +__date__ = 'August 2017' |
| 22 | +__copyright__ = '(C) 2017, Nyall Dawson' |
| 23 | + |
| 24 | +# This will get replaced with a git SHA1 when you do a git archive |
| 25 | + |
| 26 | +__revision__ = '$Format:%H$' |
| 27 | + |
| 28 | +from qgis.testing import start_app, unittest |
| 29 | +from qgis.core import QgsApplication |
| 30 | + |
| 31 | +from processing.gui.AlgorithmDialog import AlgorithmDialog |
| 32 | + |
| 33 | +start_app() |
| 34 | + |
| 35 | + |
| 36 | +class AlgorithmDialogTest(unittest.TestCase): |
| 37 | + |
| 38 | + def testCreation(self): |
| 39 | + alg = QgsApplication.processingRegistry().algorithmById('native:centroids') |
| 40 | + a = AlgorithmDialog(alg) |
| 41 | + self.assertEqual(a.mainWidget().alg, alg) |
| 42 | + |
| 43 | + |
| 44 | +if __name__ == '__main__': |
| 45 | + unittest.main() |
0 commit comments