diff options
author | Rob Wallace <rob@wallace.gen.nz> | 2010-01-30 12:39:10 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-01-30 12:39:10 +0100 |
commit | 4de148430b3e5b748a5e1188b93122a963e817e0 (patch) | |
tree | 8e43b0d806cad3b49b33f06a85a014ff31238fa7 /test/gps_coordinate.py | |
parent | cdb85336462d7f35aa5cd67dc9617d22d9145903 (diff) | |
download | pyexiv2-4de148430b3e5b748a5e1188b93122a963e817e0.tar.gz |
Longitudes accept values between 0 and 180 degrees.
Diffstat (limited to 'test/gps_coordinate.py')
-rw-r--r-- | test/gps_coordinate.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/gps_coordinate.py b/test/gps_coordinate.py index 517f47e..6210fb5 100644 --- a/test/gps_coordinate.py +++ b/test/gps_coordinate.py @@ -37,8 +37,13 @@ class TestGPSCoordinate(unittest.TestCase): self.assertEqual(r.minutes, 58) self.assertEqual(r.seconds, 2) self.assertEqual(r.direction, 'W') + r = GPSCoordinate(92, 58, 2, 'W') + self.assertEqual(r.degrees, 92) + self.assertEqual(r.minutes, 58) + self.assertEqual(r.seconds, 2) + self.assertEqual(r.direction, 'W') self.assertRaises(ValueError, GPSCoordinate, -23, 58, 2, 'W') - self.assertRaises(ValueError, GPSCoordinate, 91, 58, 2, 'W') + self.assertRaises(ValueError, GPSCoordinate, 91, 58, 2, 'S') self.assertRaises(ValueError, GPSCoordinate, 62, -23, 2, 'W') self.assertRaises(ValueError, GPSCoordinate, 62, 61, 2, 'W') self.assertRaises(ValueError, GPSCoordinate, 62, 58, -23, 'W') |