-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,974 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FILE(GLOB PY_FILES *.py) | ||
FILE(GLOB TEST_DATA_FILES testdata/points.* testdata/table.dbf) | ||
|
||
PLUGIN_INSTALL(ResourceSharing test ${PY_FILES}) | ||
PLUGIN_INSTALL(ResourceSharing test/testdata ${TEST_DATA_FILES}) | ||
|
||
IF(ENABLE_TESTS) | ||
|
||
FOREACH(dir | ||
gui | ||
data | ||
data/collections | ||
data/collections/test_collection | ||
data/collections/test_collection/preview | ||
data/collections/test_collection/svg | ||
data/collections/test_collection/processing | ||
data/collections/test_collection/image | ||
data/collections/test_collection/symbol | ||
data/collections/test_collection/style | ||
repository_handler | ||
resource_handler | ||
) | ||
FILE(GLOB _items ${dir}/*) | ||
SET(_files) | ||
FOREACH(_item ${_items}) | ||
IF(NOT IS_DIRECTORY ${_item}) | ||
LIST(APPEND _files ${_item}) | ||
ENDIF(NOT IS_DIRECTORY ${_item}) | ||
ENDFOREACH(_item) | ||
PLUGIN_INSTALL(ResourceSharing test/${dir} ${_files}) | ||
ENDFOREACH(dir) | ||
|
||
|
||
INCLUDE(UsePythonTest) | ||
ADD_PYTHON_TEST(ResourceSharingInitTest test_init.py) | ||
ADD_PYTHON_TEST(ResourceSharingCollectionManagerTest test_collections_manager.py) | ||
ADD_PYTHON_TEST(ResourceSharingSymbolXmlExtractorTest test_symbol_xml_extractor.py) | ||
ENDIF(ENABLE_TESTS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# import qgis libs so that ve set the correct sip api version | ||
import qgis # pylint: disable=W0611 # NOQA | ||
import sys | ||
import os | ||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'ext_libs'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# QGIS-style-repo-dummy |
674 changes: 674 additions & 0 deletions
674
python/plugins/ResourceSharing/test/data/collections/test_collection/LICENSE.txt
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+1.34 KB
...ugins/ResourceSharing/test/data/collections/test_collection/image/bulbasaur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.45 KB
...gins/ResourceSharing/test/data/collections/test_collection/image/charmander.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.67 KB
...plugins/ResourceSharing/test/data/collections/test_collection/image/pikachu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.65 KB
...lugins/ResourceSharing/test/data/collections/test_collection/image/squirtle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+248 KB
...lugins/ResourceSharing/test/data/collections/test_collection/preview/prev_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+370 KB
...lugins/ResourceSharing/test/data/collections/test_collection/preview/prev_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions
17
...ns/ResourceSharing/test/data/collections/test_collection/processing/Points_from_vector.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
##Points=group | ||
##Input_raster=raster | ||
##Input_vector=vector | ||
##Output_layer=output vector | ||
|
||
from qgis.core import * | ||
|
||
vector = processing.getObject(Input_vector) | ||
raster = processing.getObject(Input_raster) | ||
|
||
geometryType = vector.geometryType() | ||
if geometryType == QGis.Point: | ||
processing.runalg('qgis:saveselectedfeatures', vector, Output_layer) | ||
elif geometryType == QGis.Line: | ||
processing.runalg('qgis:generatepointspixelcentroidsalongline', raster, vector, Output_layer) | ||
elif geometryType == QGis.Polygon: | ||
processing.runalg('qgis:generatepointspixelcentroidsinsidepolygons', raster, vector, Output_layer) |
343 changes: 343 additions & 0 deletions
343
.../plugins/ResourceSharing/test/data/collections/test_collection/style/pikachu_building.qml
Large diffs are not rendered by default.
Oops, something went wrong.
319 changes: 319 additions & 0 deletions
319
...on/plugins/ResourceSharing/test/data/collections/test_collection/style/style_with_svg.qml
Large diffs are not rendered by default.
Oops, something went wrong.
319 changes: 319 additions & 0 deletions
319
...ceSharing/test/data/collections/test_collection/style/style_with_svg_other_collection.qml
Large diffs are not rendered by default.
Oops, something went wrong.
99 changes: 99 additions & 0 deletions
99
...plugins/ResourceSharing/test/data/collections/test_collection/svg/blastoise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions
96
...plugins/ResourceSharing/test/data/collections/test_collection/svg/charizard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions
92
...on/plugins/ResourceSharing/test/data/collections/test_collection/svg/raychu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.