Fix processing tests

This commit is contained in:
Nyall Dawson 2017-10-16 17:35:55 +10:00
parent cc5f7b1dfb
commit 54f8825350
5 changed files with 10 additions and 2 deletions

View File

@ -27,6 +27,7 @@ __revision__ = '$Format:%H$'
from qgis.testing import start_app, unittest
from qgis.core import QgsApplication
from qgis.analysis import QgsNativeAlgorithms
from processing.gui.AlgorithmDialog import AlgorithmDialog
from processing.gui.BatchAlgorithmDialog import BatchAlgorithmDialog
@ -34,6 +35,7 @@ from processing.modeler.ModelerParametersDialog import ModelerParametersDialog
from processing.gui.wrappers import *
start_app()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())
class AlgorithmDialogTest(unittest.TestCase):

View File

@ -16,7 +16,7 @@
***************************************************************************/
#ifndef QGSALGORITHMASSIGNPROJECTION_H
#define QGSALGORITHMASSIGNPROJECTION_HH
#define QGSALGORITHMASSIGNPROJECTION_H
#define SIP_NO_FILE

View File

@ -12,9 +12,12 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src/core/expression
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/processing
${CMAKE_SOURCE_DIR}/src/core/processing/models
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/symbology
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/processing
${CMAKE_SOURCE_DIR}/src/analysis/vector
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/test
@ -64,6 +67,7 @@ ENDMACRO (ADD_QGIS_TEST)
# Tests:
SET(TESTS
testqgsgeometrysnapper.cpp
testqgsprocessing.cpp
testqgszonalstatistics.cpp
testqgsrastercalculator.cpp
testqgsalignraster.cpp

View File

@ -21,6 +21,7 @@
#include "qgsprocessingalgorithm.h"
#include "qgsprocessingcontext.h"
#include "qgsprocessingmodelalgorithm.h"
#include "qgsnativealgorithms.h"
#include <QObject>
#include <QtTest/QSignalSpy>
#include "qgis.h"
@ -368,6 +369,8 @@ void TestQgsProcessing::initTestCase()
QCoreApplication::setOrganizationName( QStringLiteral( "QGIS" ) );
QCoreApplication::setOrganizationDomain( QStringLiteral( "qgis.org" ) );
QCoreApplication::setApplicationName( QStringLiteral( "QGIS-TEST" ) );
QgsApplication::processingRegistry()->addProvider( new QgsNativeAlgorithms( QgsApplication::processingRegistry() ) );
}
void TestQgsProcessing::cleanupTestCase()

View File

@ -161,7 +161,6 @@ SET(TESTS
testqgspointlocator.cpp
testqgspointpatternfillsymbol.cpp
testqgspoint.cpp
testqgsprocessing.cpp
testqgsproject.cpp
testqgsproperty.cpp
testqgis.cpp