Skip to content

Commit 5765d49

Browse files
committed
Add unit test for line tolerance
1 parent 075d53f commit 5765d49

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed

tests/src/python/test_qgsserver_wms_getfeatureinfo.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,34 @@ def testGetFeatureInfoTolerance(self):
351351
'wms_getfeatureinfo_point_tolerance_20_text_xml',
352352
'test_project_values.qgz')
353353

354+
self.wms_request_compare('GetFeatureInfo',
355+
'&layers=ls2d&styles=&' +
356+
'VERSION=1.3.0&' +
357+
'info_format=text%2Fxml&' +
358+
'width=400&height=200' +
359+
'&bbox=-50396.4,-2783.0,161715.8,114108.6' +
360+
'&CRS=EPSG:3857' +
361+
'&FEATURE_COUNT=10' +
362+
'&WITH_GEOMETRY=False' +
363+
'&QUERY_LAYERS=ls2d&I=153&J=147' +
364+
'&FI_LINE_TOLERANCE=0',
365+
'wms_getfeatureinfo_line_tolerance_0_text_xml',
366+
'test_project_values.qgz')
367+
368+
self.wms_request_compare('GetFeatureInfo',
369+
'&layers=ls2d&styles=&' +
370+
'VERSION=1.3.0&' +
371+
'info_format=text%2Fxml&' +
372+
'width=400&height=200' +
373+
'&bbox=-50396.4,-2783.0,161715.8,114108.6' +
374+
'&CRS=EPSG:3857' +
375+
'&FEATURE_COUNT=10' +
376+
'&WITH_GEOMETRY=False' +
377+
'&QUERY_LAYERS=ls2d&I=153&J=147' +
378+
'&FI_LINE_TOLERANCE=20',
379+
'wms_getfeatureinfo_line_tolerance_20_text_xml',
380+
'test_project_values.qgz')
381+
354382

355383
if __name__ == '__main__':
356384
unittest.main()

tests/testdata/qgis_server/db.gpkg

0 Bytes
Binary file not shown.
523 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*****
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="ls2d">
6+
</GetFeatureInfoResponse>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*****
2+
Content-Type: text/xml; charset=utf-8
3+
4+
<GetFeatureInfoResponse>
5+
<Layer name="ls2d">
6+
<Feature id="1">
7+
<Attribute value="1" name="id"/>
8+
</Feature>
9+
</Layer>
10+
</GetFeatureInfoResponse>

0 commit comments

Comments
 (0)