Skip to content

Commit 53d70ea

Browse files
committedMay 24, 2020
add tests
1 parent 263d2a8 commit 53d70ea

File tree

9 files changed

+222
-17
lines changed

9 files changed

+222
-17
lines changed
 

‎python/plugins/processing/tests/testdata/expected/grass7/r.distance.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎python/plugins/processing/tests/testdata/expected/grass7/r.tileset.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎python/plugins/processing/tests/testdata/expected/grass7/r.transect.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎python/plugins/processing/tests/testdata/expected/grass7/r.what.colors.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><p>1|
2+
</br>3|
3+
</br></p></body></html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><p>1|1|0|344550|6693650|344550|6693650
2+
</br>1|2|100|357850|6693650|357850|6693550
3+
</br>1|3|100|352650|6693650|352750|6693650
4+
</br>1|4|100|344550|6693650|344650|6693650
5+
</br></p></body></html>
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><p> 0.000000 *
2+
</br> 11.131738 *
3+
</br> 22.263476 *
4+
</br> 33.395214 *
5+
</br> 44.526952 *
6+
</br> 55.658690 *
7+
</br> 66.790428 *
8+
</br> 77.922166 *
9+
</br> 89.053904 *
10+
</br> 100.185642 *
11+
</br> 111.317380 *
12+
</br> 122.449118 *
13+
</br> 133.580856 *
14+
</br> 144.712594 *
15+
</br> 155.844332 *
16+
</br> 166.976070 *
17+
</br> 178.107808 *
18+
</br> 189.239546 *
19+
</br> 200.371284 *
20+
</br> 211.503022 *
21+
</br> 222.634760 *
22+
</br> 233.766498 *
23+
</br> 244.898236 *
24+
</br> 256.029974 *
25+
</br> 267.161712 *
26+
</br> 278.293450 *
27+
</br> 289.425188 *
28+
</br> 300.556926 *
29+
</br> 311.688664 *
30+
</br> 322.820402 *
31+
</br> 333.952140 *
32+
</br> 345.083878 *
33+
</br> 356.215616 *
34+
</br> 367.347354 *
35+
</br> 378.479092 *
36+
</br> 389.610830 *
37+
</br> 400.742568 *
38+
</br> 411.874306 *
39+
</br> 423.006044 *
40+
</br> 434.137782 *
41+
</br> 445.269520 *
42+
</br> 456.401258 *
43+
</br> 467.532996 *
44+
</br> 478.664735 *
45+
</br> 489.796473 *
46+
</br> 500.928211 205.138351
47+
</br> 512.059949 205.318710
48+
</br> 523.191687 205.495285
49+
</br> 534.323425 205.495285
50+
</br> 545.455163 205.821854
51+
</br> 556.586901 205.821854
52+
</br> 567.718639 205.783768
53+
</br> 578.850377 205.979141
54+
</br> 589.982115 206.251450
55+
</br> 601.113853 206.251450
56+
</br> 612.245591 205.880493
57+
</br> 623.377329 205.836166
58+
</br> 634.509067 205.732651
59+
</br> 645.640805 205.595428
60+
</br> 656.772543 205.430023
61+
</br> 667.904281 205.378067
62+
</br> 679.036019 205.319443
63+
</br> 690.167757 205.254715
64+
</br> 701.299495 205.249222
65+
</br> 712.431233 205.236145
66+
</br> 723.562971 205.259949
67+
</br> 734.694709 205.270432
68+
</br> 745.826447 205.262131
69+
</br> 756.958185 205.377014
70+
</br> 768.089923 205.607269
71+
</br> 779.221661 205.595917
72+
</br> 790.353399 205.595917
73+
</br> 801.485137 205.434143
74+
</br> 812.616875 205.460281
75+
</br> 823.748613 204.887589
76+
</br> 834.880351 204.887589
77+
</br> 846.012089 204.897888
78+
</br> 857.143827 204.760162
79+
</br> 868.275565 204.667984
80+
</br> 879.407303 204.429520
81+
</br> 890.539041 204.267075
82+
</br> 901.670779 204.102463
83+
</br> 912.802517 204.111267
84+
</br> 923.934255 204.006958
85+
</br> 935.065993 203.916763
86+
</br> 946.197731 203.916763
87+
</br> 957.329469 203.844650
88+
</br> 968.461207 203.807053
89+
</br> 979.592945 203.620804
90+
</br> 990.724683 203.620804
91+
</br> 1001.856421 203.590958
92+
</br> 1012.988159 203.568954
93+
</br> 1024.119897 202.713715
94+
</br> 1035.251635 202.250137
95+
</br> 1046.383373 202.496780
96+
</br> 1057.515111 202.496780
97+
</br> 1068.646849 202.220749
98+
</br> 1079.778587 201.905304
99+
</br> 1090.910325 202.617706
100+
</br> 1102.042063 202.617706
101+
</br> 1113.173801 202.548965
102+
</br> 1124.305539 202.548965
103+
</br> 1135.437277 201.737747
104+
</br> 1146.569015 203.751297
105+
</br> 1157.700753 204.331894
106+
</br> 1168.832491 205.502548
107+
</br> 1179.964229 205.094772
108+
</br> 1191.095967 206.328064
109+
</br> 1202.227705 207.685989
110+
</br> 1213.359443 207.685989
111+
</br> 1224.491181 207.228424
112+
</br> 1235.622919 208.234695
113+
</br> 1246.754657 207.387192
114+
</br> 1257.886395 208.456528
115+
</br> 1269.018133 207.702118
116+
</br> 1280.149871 209.769608
117+
</br> 1291.281609 209.256638
118+
</br> 1302.413347 210.122696
119+
</br> 1313.545085 210.852707
120+
</br> 1324.676823 210.477142
121+
</br> 1335.808561 210.969177
122+
</br> 1346.940299 211.702469
123+
</br> 1358.072037 212.129456
124+
</br> 1369.203775 212.273148
125+
</br> 1380.335513 211.513382
126+
</br> 1391.467251 211.751450
127+
</br> 1402.598989 211.751450
128+
</br> 1413.730728 211.751450
129+
</br> 1424.862466 212.713165
130+
</br> 1435.994204 212.717163
131+
</br> 1447.125942 212.597549
132+
</br> 1458.257680 212.465286
133+
</br> 1469.389418 211.670486
134+
</br> 1480.521156 211.176804
135+
</br> 1491.652894 210.477997
136+
</br></p></body></html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
100: 70:10:93

‎python/plugins/processing/tests/testdata/grass7_algorithms_raster_tests.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,22 @@ tests:
149149
type: file
150150
name: expected/grass7/r.what.points.txt
151151

152+
- algorithm: grass7:r.what.color
153+
name: GRASS 7 r.what.color
154+
params:
155+
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
156+
format: '%d:%d:%d'
157+
input:
158+
name: custom/grass7/float_raster.tif
159+
type: raster
160+
value: '100'
161+
results:
162+
html:
163+
name: expected/grass7/r_what_color.html
164+
type: regex
165+
rules:
166+
- '100: 70:10:93'
167+
152168
- algorithm: grass7:r.what.coords
153169
name: GRASS7 r.what.coords
154170
params:
@@ -1518,3 +1534,64 @@ tests:
15181534
output:
15191535
hash: b07a8fd2a3ff63851d0eb123cafd8024986d22ea453f89c808765c83
15201536
type: rasterhash
1537+
1538+
- algorithm: grass7:r.transect
1539+
name: GRASS 7 r.transect
1540+
params:
1541+
-g: false
1542+
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
1543+
line: 2077686.512558,5744286.456837,45,1500
1544+
map:
1545+
name: custom/dem_crs.tif
1546+
type: raster
1547+
null_value: '*'
1548+
results:
1549+
html:
1550+
name: expected/grass7/r_transect.html
1551+
type: regex
1552+
rules:
1553+
- '556.586901 205.821854'
1554+
- '1191.095967 206.328064'
1555+
- '1435.994204 212.717163'
1556+
1557+
- algorithm: grass7:r.category.out
1558+
name: GRASS 7 r.category.out
1559+
params:
1560+
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
1561+
cats: 1,3
1562+
map:
1563+
name: custom/grass7/raster_6class.tif
1564+
type: raster
1565+
separator: pipe
1566+
values: ''
1567+
results:
1568+
html:
1569+
name: expected/grass7/r_category_out.html
1570+
type: regex
1571+
rules:
1572+
- '1|'
1573+
- '3|'
1574+
1575+
- algorithm: grass7:r.distance
1576+
name: GRASS 7 r.distance
1577+
params:
1578+
-l: false
1579+
-n: false
1580+
-o: false
1581+
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
1582+
map:
1583+
params:
1584+
- name: custom/grass7/raster_1class.tif
1585+
type: raster
1586+
- name: custom/grass7/raster_4class.tif
1587+
type: raster
1588+
type: multi
1589+
separator: pipe
1590+
sort: 0
1591+
results:
1592+
html:
1593+
name: expected/grass7/r_distance.html
1594+
type: regex
1595+
rules:
1596+
- '1|1|0|344550|6693650|344550|6693650'
1597+
- '1|3|100|352650|6693650|352750|6693650'

0 commit comments

Comments
 (0)
Please sign in to comment.