Add test for NULL bounding box of empty line

This commit is contained in:
Matthias Kuhn 2015-06-04 12:42:34 +02:00
parent 033baf1b0c
commit 10c7d6aa06

View File

@ -1103,6 +1103,11 @@ class TestQgsGeometry(TestCase):
bb = polygon.boundingBox()
assert expbb == bb, "Expected:\n%s\nGot:\n%s\n" % (expbb.toString(), bb.toString())
# NULL
points = []
line = QgsGeometry.fromPolyline(points)
assert line.boundingBox().isNull()
def testAddPart(self):
# 2-3 6-+-7
# | | | |