Skip to content

Commit

Permalink
Add angle unit tests for mil
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Jul 16, 2019
1 parent 7013539 commit a51fbd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/src/python/test_qgsunittypes.py
Expand Up @@ -558,6 +558,7 @@ def testEncodeDecodeAngleUnits(self):
QgsUnitTypes.AngleMinutesOfArc,
QgsUnitTypes.AngleSecondsOfArc,
QgsUnitTypes.AngleTurn,
QgsUnitTypes.AngleMil,
QgsUnitTypes.AngleUnknownUnit]

for u in units:
Expand All @@ -583,6 +584,7 @@ def testAngleToString(self):
QgsUnitTypes.AngleMinutesOfArc,
QgsUnitTypes.AngleSecondsOfArc,
QgsUnitTypes.AngleTurn,
QgsUnitTypes.AngleMil,
QgsUnitTypes.AngleUnknownUnit]

dupes = set()
Expand Down Expand Up @@ -629,6 +631,7 @@ def testFormatAngle(self):
self.assertEqual(QgsUnitTypes.formatAngle(1.11111111, 4, QgsUnitTypes.AngleMinutesOfArc), '1.1111′')
self.assertEqual(QgsUnitTypes.formatAngle(1.99999999, 2, QgsUnitTypes.AngleSecondsOfArc), '2.00″')
self.assertEqual(QgsUnitTypes.formatAngle(1, 2, QgsUnitTypes.AngleTurn), '1.00 tr')
self.assertEqual(QgsUnitTypes.formatAngle(1, 2, QgsUnitTypes.AngleMil), '1.00 mil')
self.assertEqual(QgsUnitTypes.formatAngle(1, 2, QgsUnitTypes.AngleUnknownUnit), '1.00')

def testEncodeDecodeLayoutUnits(self):
Expand Down

0 comments on commit a51fbd6

Please sign in to comment.