Skip to content
Permalink
Browse files

Fix failing tests

  • Loading branch information
nyalldawson committed Jul 25, 2018
1 parent faec324 commit d3bee8dc7e631425404d31ac1655d68e86f3ab97
Showing with 6 additions and 6 deletions.
  1. +6 −6 tests/src/python/test_python_repr.py
@@ -26,23 +26,23 @@ class TestPython__repr__(unittest.TestCase):
def testQgsGeometryRepr(self):
p = QgsPointXY(123.456, 987.654)
g = QgsGeometry.fromPointXY(p)
self.assertTrue(g.__repr__().startswith('<QgsGeometry: Point (123.456)'))
self.assertTrue(g.__repr__().startswith('<QgsGeometry: Point (123.456'))

def testQgsPointRepr(self):
p = QgsPoint(123.456, 987.654, 100)
self.assertTrue(p.__repr__().startswith('<QgsPoint: PointZ (123.456)'))
self.assertTrue(p.__repr__().startswith('<QgsPoint: PointZ (123.456'))

def testQgsPointXYRepr(self):
p = QgsPointXY(123.456, 987.654)
self.assertTrue(p.__repr__().startswith('<QgsPointXY: POINT(123.456'))
self.assertTrue(p.__repr__().startswith('<QgsPointXY: POINT(123.456'))

def testQgsCircleRepr(self):
c = QgsCircle(QgsPoint(1, 1), 2.0)
self.assertEqual(c.__repr__(), '<QgsCircle: Circle (Center: Point (1 1), Radius: 2, Azimuth: 0)>')
self.assertEqual(c.__repr__(), '<QgsCircle: Circle (Center: Point (1 1), Radius: 2, Azimuth: 0)>')

def testQgsCircularstringRepr(self):
cs = QgsCircularString(QgsPoint(1, 2), QgsPoint(2, 3), QgsPoint(3, 4))
self.assertEqual(cs.__repr__(), '<QgsCompoundCurve: CompoundCurve (CircularString (1 2, 2 3, 3 4))>')
self.assertEqual(cs.__repr__(), '<QgsCircularString: CircularString (1 2, 2 3, 3 4)>')

def testQgsCompoundcurveRepr(self):
cs = QgsCircularString(QgsPoint(1, 2), QgsPoint(2, 3), QgsPoint(3, 4))
@@ -110,7 +110,7 @@ def testQgsPolygonRepr(self):

def testQgsRectangleRepr(self):
r = QgsRectangle(1, 2, 3, 4)
self.assertEqual(r.constGet().__repr__(), '<QgsRectangle: 1 2, 3 4>')
self.assertEqual(r.__repr__(), '<QgsRectangle: 1 2, 3 4>')


if __name__ == "__main__":

0 comments on commit d3bee8d

Please sign in to comment.
You can’t perform that action at this time.