31 Commits

Author SHA1 Message Date
Alexander Bruy
4bbb07f48f rename processing qgis test to allow running only subset of tests 2019-12-09 13:28:32 +02:00
Sandro Santilli
76b39de1b8
Add ENABLE_SAGA_TESTS cmake config, default to off, enable in ci (#32199)
* Add ENABLE_SAGA_TESTS cmake config, default to off, enable in ci

Closes #32143

* Update python/plugins/processing/tests/CMakeLists.txt

Co-Authored-By: Harrissou Sant-anna <delazj@gmail.com>
2019-10-11 11:26:33 +02:00
Alexander Bruy
f16f7f765e reorganize gdal provider tests
Now GDAL algorithms test are splitted into parts: general tests, raster
algorithms and vector algorithms. This makes testing a bit faster and
easier, as there is no need to run not related tests.
2019-06-25 09:59:50 +03:00
Nyall Dawson
e2bd17f3c9 Split processing test files into multiple batches
There's two motivations for this:
- the existing one was getting massive and took ages to run, which was
a pain when developing. Smaller batches allow just a subset of test to
be run which is much faster.
- There's a random segfault on test exit which occurs on Travis. Rather
then disabling these absolutely critical tests altogether, I'm using
this as a method of bisecting exactly which alg is causing this.
2019-05-09 14:04:30 +10:00
Luigi Pirelli
c0ec79ef05
Merge pull request #9172 from luipir/fix_19731
try to reset script path pointing to the current setting path
2019-04-29 10:48:24 +02:00
Rashad Kanavath
30bcfebb47 [TEST] add test for OTB processing provider
This includes yaml test like SAGA, GRASS and also test for loading
OTB Algorithms
2019-02-23 05:20:17 +10:00
Luigi Pirelli
a2bf5ccefd try to reset script path pointing to the current setting path 2019-02-13 18:52:18 +01:00
Nyall Dawson
7f7c7a9789 [processing][needs-docs] Add friendlier API for running algorithms as sub-steps
of main algorithm

Using code like:

    buffered_layer = processing.run(..., context, feedback)['OUTPUT']
    ...
    return {'OUTPUT': buffered_layer}

can cause issues if done as a sub-step of a larger processing algorithm. This
is because ownership of the generated layer is transferred to the caller
(Python) by processing.run. When the algorithm returns, Processing
attempts to move ownership of the layer from the context to the caller,
resulting in a crash.

(This is by design, because processing.run has been optimised for the
most common use case, which is one-off execution of algorithms as part
of a script, not as part of another processing algorithm. Accordingly
by design it returns layers and ownership to the caller, making things
easier for callers as they do not then have to resolve the layer reference
from the context object and handle ownership themselves)

This commit adds a new "is_child_algorithm" argument to processing.run.
For algorithms which are executed as sub-steps of a larger algorithm
is_child_algorithm should be set to True to avoid any ownership issues
with layers. E.g.

    buffered_layer = processing.run(..., context, feedback, is_child_algorithm=True)['OUTPUT']
    ...
    return {'OUTPUT': buffered_layer}
2019-01-29 18:04:16 +11:00
Alessandro Pasotti
82a5c8f170 Move test from tests to processing folder 2018-09-19 18:29:26 +02:00
Nyall Dawson
63fd4bab2a [processing][FEATURE] Store models inside QGIS project files
Allows processing models to be stored inside QGIS project files,
so that opening the project makes that model available.

Some models are so intrinsically linked to the logic inside
a particular project that they have no meaning (or are totally
broken) outside of that project (e.g. models which rely
on the presence of particular map layers, relations, etc)

This change allows these models to be stored inside that project,
avoid cluttering up the "global" model provider with models
which make no sense, and making it easier to distribute a single
project with these models included.

Models are stored inside projects by clicking the new "embed
in project" button in the modeler dialog toolbar. Models can be
removed from a project from the model's right click menu in the
toolbox.
2018-08-13 15:47:01 +10:00
Nyall Dawson
b3288192ee [processing] Fix exception when clicking help for GDAL algorithms 2018-05-06 07:13:15 +10:00
Nyall Dawson
8ba762a630 [processing][grass] Fix grass vector algs don't work with memory layers
Fixes broken grass algs inside models (fixes #18662)
2018-04-09 10:58:41 +10:00
Alexander Bruy
e1a64f6a8f [processing] remove unused files 2018-02-05 08:50:37 +02:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Alexander Bruy
b4214798e9 [processing] infrastructure for SAGA tests 2017-11-09 18:56:44 +02:00
Nyall Dawson
69a25d0f43 Add initial test suite for processing algorithm dialog 2017-08-05 06:48:23 +10:00
Alexander Bruy
c603df1aa8 [processing] allow tests for scripts 2017-03-16 17:48:39 +02:00
volaya
f94f0d753c [processing] removed otb tests 2017-01-30 11:59:49 +01:00
Alexander Bruy
85d1fd720b [processing] cleanup test data 2016-11-12 13:31:44 +02:00
Nyall Dawson
10648dfb0c [processing] Start of tests for modeler 2016-11-11 08:35:38 +10:00
Alexander Bruy
d4f410a307 Install OTB in QGIS Travis CI script to be able to run OTB test 2016-10-20 09:23:09 +03:00
Manuel Grizonnet
1e7018f0cc TEST: add test of OTB BandMath application in processing 2016-10-20 09:21:40 +03:00
Nyall Dawson
9e1ddcb54d [processing] Allow modification of feature request when using
vector.features

Allows for optimising the request through subsets of attributes
or no geometry fetching
2016-07-13 12:06:41 +10:00
Médéric RIBREUX
dbd1050879 [Processing][Tests] Improve Processing GRASS7 testsuite 2016-06-11 11:27:23 +02:00
Médéric Ribreux
e70f9bcf0c Add first set of unit tests 2016-05-29 09:00:16 +02:00
Matthias Kuhn
781c10ba1c [processing] Add gdal test 2016-02-23 09:33:41 +01:00
Matthias Kuhn
450fb13047 [processing] Move AlgorithmTests to QgisAlgorithmTests 2016-02-23 09:33:41 +01:00
Matthias Kuhn
ff04fd3b52 [processing] Add test suite 2016-02-04 13:36:43 +01:00
Juergen E. Fischer
2566061059 processing: include non-optional testdata 2016-02-04 02:04:47 +01:00
Michael Kirk
afcf567ebb [Processing] fixup parameters test
- Broke into per class testcase
- Each method tries to test only one aspect of behavior
- Use unittest assertions for better error output
- Removed non-existant serialize functionality from tests
- Test BooleanParameter

Conflicts:
	python/plugins/processing/core/parameters.py
2015-12-24 15:14:02 +01:00
Victor Olaya
9bb3d6eb6b renamed "sextante" to "processing" 2013-08-20 09:22:03 +02:00