Skip to content
Permalink
Browse files

Split grass raster tests into two blocks

  • Loading branch information
nyalldawson committed Feb 8, 2021
1 parent 9e56b8b commit c7a25c6275636cafea5ac4e65513943e116a2abf
@@ -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)
@@ -2,7 +2,7 @@

"""
***************************************************************************
Grass7AlgorithmsRasterTest.py
Grass7AlgorithmsRasterTestPt1.py
-----------------------------
Date : May 2016
Copyright : (C) 2016 by Médéric Ribreux
@@ -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__':
@@ -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 c7a25c6

Please sign in to comment.