QgisAlgorithmsTest2.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. """
  2. ***************************************************************************
  3. QgisAlgorithmTests2.py
  4. ---------------------
  5. Date : January 2016
  6. Copyright : (C) 2016 by Matthias Kuhn
  7. Email : matthias@opengis.ch
  8. ***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************
  16. """
  17. __author__ = 'Matthias Kuhn'
  18. __date__ = 'January 2016'
  19. __copyright__ = '(C) 2016, Matthias Kuhn'
  20. import AlgorithmsTestBase
  21. import nose2
  22. import shutil
  23. import os
  24. from qgis.core import (QgsApplication,
  25. QgsProcessingException)
  26. from qgis.analysis import (QgsNativeAlgorithms)
  27. import unittest
  28. from qgis.testing import start_app, QgisTestCase
  29. from processing.core.ProcessingConfig import ProcessingConfig
  30. from processing.modeler.ModelerUtils import ModelerUtils
  31. class TestQgisAlgorithms2(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
  32. @classmethod
  33. def setUpClass(cls):
  34. start_app()
  35. from processing.core.Processing import Processing
  36. Processing.initialize()
  37. cls.cleanup_paths = []
  38. cls.in_place_layers = {}
  39. cls.vector_layer_params = {}
  40. @classmethod
  41. def tearDownClass(cls):
  42. from processing.core.Processing import Processing
  43. Processing.deinitialize()
  44. for path in cls.cleanup_paths:
  45. shutil.rmtree(path)
  46. def test_definition_file(self):
  47. return 'qgis_algorithm_tests2.yaml'
  48. if __name__ == '__main__':
  49. nose2.main()