Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_system_operators(self):
"""Test operators"""
wgs84 = core.geodetic.System()
# https://en.wikipedia.org/wiki/Geodetic_Reference_System_1980
grs80 = core.geodetic.System(6378137, 1 / 298.257222101)
self.assertAlmostEqual(grs80.semi_major_axis, 6378137)
self.assertAlmostEqual(grs80.flattening, 1 / 298.257222101)
self.assertEqual(wgs84, wgs84)
self.assertNotEqual(wgs84, grs80)
def test_system_pickle(self):
"""Serialization test"""
wgs84 = core.geodetic.System()
self.assertEqual(wgs84, pickle.loads(pickle.dumps(wgs84)))