Skip to content

Commit 10c7d6a

Browse files
committed
Add test for NULL bounding box of empty line
1 parent 033baf1 commit 10c7d6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/src/python/test_qgsgeometry.py

+5
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,11 @@ def testBoundingBox(self):
11031103
bb = polygon.boundingBox()
11041104
assert expbb == bb, "Expected:\n%s\nGot:\n%s\n" % (expbb.toString(), bb.toString())
11051105

1106+
# NULL
1107+
points = []
1108+
line = QgsGeometry.fromPolyline(points)
1109+
assert line.boundingBox().isNull()
1110+
11061111
def testAddPart(self):
11071112
# 2-3 6-+-7
11081113
# | | | |

0 commit comments

Comments
 (0)