Skip to content

Commit

Permalink
SpherePoint tests no longer require NaN output to be signed.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Nov 1, 2016
1 parent cca7d9d commit 1b247b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testSpherePoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,11 +758,11 @@ def testStrValue(self):
self.assertRegexpMatches(numbers[0], r'-?nan')
if not math.isnan(point.getLatitude().asRadians()):
self.assertAlmostEqual(point.getLatitude().asDegrees(), float(numbers[1]), delta=1e-6)
# Latitude must be signed
self.assertTrue(numbers[1].startswith("+") or numbers[1].startswith("-"))
else:
self.assertRegexpMatches(numbers[1], r'\+|-nan')

# Latitude must be signed
self.assertTrue(numbers[1].startswith("+") or numbers[1].startswith("-"))
# Some C++ compilers will output NaN with a sign, others won't
self.assertRegexpMatches(numbers[1], r'(?:\+|-)?nan')

def testReprValue(self):
"""Test if __repr__ is a machine-readable representation.
Expand Down

0 comments on commit 1b247b9

Please sign in to comment.