Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
nyalldawson committed Jul 25, 2018
1 parent faec324 commit d3bee8d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/python/test_python_repr.py
Expand Up @@ -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))
Expand Down Expand Up @@ -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__":
Expand Down

0 comments on commit d3bee8d

Please sign in to comment.