def test_plonType_outOfBounds_negative(self): """ Test of plon values smaller than -180 """ with self.assertRaisesRegex(argparse.ArgumentTypeError, "Longitude.*should be between"): _ = plon_type(-200)
def test_plonType_outOfBounds_positive(self): """ Test of plon values greater than 360 """ with self.assertRaisesRegex(argparse.ArgumentTypeError, "Longitude.*should be between"): _ = plon_type(360.5)
def test_plonType_positive_360(self): """ Test for when plon values are 360. """ result = plon_type(360) self.assertEqual(result, 360.0)
def test_plonType_zero(self): """ Test for when plon values are 0 """ result = plon_type(0) self.assertEqual(result, 0)
def test_plonType_negative_180(self): """ Test for when plon values are -180 """ result = plon_type(-180) self.assertEqual(result, 180.0)
def test_plonType_negative(self): """ Test of negative plon between -180 and 0 """ result = plon_type(-30) self.assertEqual(result, 330.0)
def test_plonType_positive(self): """ Test of positive plon between 0 and 360 """ result = plon_type(30) self.assertEqual(result, 30.0)