Skip to content
Permalink
Browse files

Fix failing tests, temporarily disable some processing tests during

refactoring
  • Loading branch information
nyalldawson committed Jun 5, 2017
1 parent 7683b25 commit ea2e477d91544c50be4761692418f06477efe43c
@@ -8,6 +8,11 @@ ProcessingGrass7AlgorithmsImageryTest
ProcessingGrass7AlgorithmsRasterTest
PyQgsDBManagerGpkg

# temporary during processing refactoring
ProcessingParametersTest
ProcessingModelerTest
ProcessingGdalAlgorithmsTest

# layout tests are run on separate build
qgis_indentation
qgis_spelling
@@ -2070,7 +2070,6 @@ Set the extent
QgsVectorLayer( const QgsVectorLayer &rhs );
};


/************************************************************************
* This file has been generated automatically from *
* *
@@ -111,7 +111,7 @@ def getParamValues(self):
raise AlgorithmDialogBase.InvalidParameterValue(param, wrapper.widget)
else:
open_after_run = False
if not param.flags() & QgsProcessingParameterDefinition.FlagHidden and \
if not param.flags() & QgsProcessingParameterDefinition.FlagHidden and \
isinstance(param, (OutputRaster, QgsProcessingParameterFeatureSink, OutputTable)):
if self.mainWidget.checkBoxes[param.name()].isChecked():
open_after_run = True
@@ -279,7 +279,7 @@ def svgIconPath(self):
return QgsApplication.iconPath("processingModel.svg")

def addParameter(self, param):
self.inputs[param.param.name] = param
self.inputs[param.param.name()] = param

def updateParameter(self, param):
self.inputs[param.name].param = param
@@ -58,7 +58,7 @@
from processing.tools import dataobjects


def resolveFieldIndex(layer, attr):
def resolveFieldIndex(source, attr):
"""This method takes an object and returns the index field it
refers to in a layer. If the passed object is an integer, it
returns the same integer value. If the passed value is not an
@@ -72,7 +72,7 @@ def resolveFieldIndex(layer, attr):
if isinstance(attr, int):
return attr
else:
index = layer.fields().lookupField(attr)
index = source.fields().lookupField(attr)
if index == -1:
raise ValueError('Wrong field name')
return index
@@ -93,7 +93,7 @@ def values(source, *attributes):
indices = []
attr_keys = {}
for attr in attributes:
index = resolveFieldIndex(layer, attr)
index = resolveFieldIndex(source, attr)
indices.append(index)
attr_keys[index] = attr

Empty file.
@@ -192,6 +192,7 @@ class CORE_EXPORT QgsProcessingUtils
* QgsFeatureSource subclass which proxies methods to an underlying QgsFeatureSource, modifying
* results according to the settings in a QgsProcessingContext.
* \note not available in Python bindings
* \since QGIS 3.0
*/
class QgsProcessingFeatureSource : public QgsFeatureSource
{
@@ -884,7 +884,7 @@ void TestQgsProcessing::createIndex()
// selected features check, but none selected
params.insert( QStringLiteral( "layer" ), QVariant::fromValue( QgsProcessingFeatureSourceDefinition( layer->id(), true ) ) );
source.reset( QgsProcessingParameters::parameterAsSource( def, params, context ) );
bool caught;
bool caught = false;
try
{
index = QgsSpatialIndex( *source.get() );

0 comments on commit ea2e477

Please sign in to comment.
You can’t perform that action at this time.