Skip to content

Commit

Permalink
Fix processing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 16, 2017
1 parent cc5f7b1 commit 54f8825
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions python/plugins/processing/tests/GuiTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@

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
from processing.modeler.ModelerParametersDialog import ModelerParametersDialog
from processing.gui.wrappers import *

start_app()
QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms())


class AlgorithmDialogTest(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmassignprojection.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
***************************************************************************/

#ifndef QGSALGORITHMASSIGNPROJECTION_H
#define QGSALGORITHMASSIGNPROJECTION_HH
#define QGSALGORITHMASSIGNPROJECTION_H

#define SIP_NO_FILE

Expand Down
4 changes: 4 additions & 0 deletions tests/src/analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -64,6 +67,7 @@ ENDMACRO (ADD_QGIS_TEST)
# Tests:
SET(TESTS
testqgsgeometrysnapper.cpp
testqgsprocessing.cpp
testqgszonalstatistics.cpp
testqgsrastercalculator.cpp
testqgsalignraster.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qgsprocessingalgorithm.h"
#include "qgsprocessingcontext.h"
#include "qgsprocessingmodelalgorithm.h"
#include "qgsnativealgorithms.h"
#include <QObject>
#include <QtTest/QSignalSpy>
#include "qgis.h"
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion tests/src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ SET(TESTS
testqgspointlocator.cpp
testqgspointpatternfillsymbol.cpp
testqgspoint.cpp
testqgsprocessing.cpp
testqgsproject.cpp
testqgsproperty.cpp
testqgis.cpp
Expand Down

0 comments on commit 54f8825

Please sign in to comment.