Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Split grass raster tests into two blocks
(cherry picked from commit c7a25c6)
  • Loading branch information
nyalldawson committed Feb 27, 2021
1 parent 97abb6d commit d5d930f
Show file tree
Hide file tree
Showing 5 changed files with 871 additions and 808 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/tests/CMakeLists.txt
Expand Up @@ -27,7 +27,8 @@ if(ENABLE_TESTS)
ADD_PYTHON_TEST(ProcessingGdalAlgorithmsRasterTest GdalAlgorithmsRasterTest.py)
ADD_PYTHON_TEST(ProcessingGdalAlgorithmsVectorTest GdalAlgorithmsVectorTest.py)
ADD_PYTHON_TEST(ProcessingGrass7AlgorithmsImageryTest Grass7AlgorithmsImageryTest.py)
ADD_PYTHON_TEST(ProcessingGrass7AlgorithmsRasterTest Grass7AlgorithmsRasterTest.py)
ADD_PYTHON_TEST(ProcessingGrass7AlgorithmsRasterTestPt1 Grass7AlgorithmsRasterTestPt1.py)
ADD_PYTHON_TEST(ProcessingGrass7AlgorithmsRasterTestPt2 Grass7AlgorithmsRasterTestPt2.py)
ADD_PYTHON_TEST(ProcessingGrass7AlgorithmsVectorTest Grass7AlgorithmsVectorTest.py)
ADD_PYTHON_TEST(ProcessingOtbAlgorithmsTest OtbAlgorithmsTest.py)
ADD_PYTHON_TEST(ProcessingCheckValidityAlgorithmTest CheckValidityAlgorithm.py)
Expand Down
Expand Up @@ -2,7 +2,7 @@

"""
***************************************************************************
Grass7AlgorithmsRasterTest.py
Grass7AlgorithmsRasterTestPt1.py
-----------------------------
Date : May 2016
Copyright : (C) 2016 by Médéric Ribreux
Expand Down Expand Up @@ -52,7 +52,7 @@ def tearDownClass(cls):
shutil.rmtree(path)

def test_definition_file(self):
return 'grass7_algorithms_raster_tests.yaml'
return 'grass7_algorithms_raster_tests1.yaml'


if __name__ == '__main__':
Expand Down
59 changes: 59 additions & 0 deletions python/plugins/processing/tests/Grass7AlgorithmsRasterTestPt2.py
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
Grass7AlgorithmsRasterTestPt2.py
-----------------------------
Date : May 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : mederic dot ribreux at medspx dot fr
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""

__author__ = 'Médéric Ribreux'
__date__ = 'May 2016'
__copyright__ = '(C) 2016, Médéric Ribreux'

import AlgorithmsTestBase

import nose2
import shutil

from qgis.testing import (
start_app,
unittest
)
from processing.algs.grass7.Grass7Utils import Grass7Utils


class TestGrass7AlgorithmsRasterTest(unittest.TestCase, AlgorithmsTestBase.AlgorithmsTest):

@classmethod
def setUpClass(cls):
start_app()
from processing.core.Processing import Processing
Processing.initialize()
cls.cleanup_paths = []

assert Grass7Utils.installedVersion()

@classmethod
def tearDownClass(cls):
from processing.core.Processing import Processing
Processing.deinitialize()
for path in cls.cleanup_paths:
shutil.rmtree(path)

def test_definition_file(self):
return 'grass7_algorithms_raster_tests2.yaml'


if __name__ == '__main__':
nose2.main()

0 comments on commit d5d930f

Please sign in to comment.