示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 def test_plonType_positive_360(self):
     """
     Test for when plon values are 360.
     """
     result = plon_type(360)
     self.assertEqual(result, 360.0)
示例#4
0
 def test_plonType_zero(self):
     """
     Test for when plon values are 0
     """
     result = plon_type(0)
     self.assertEqual(result, 0)
示例#5
0
 def test_plonType_negative_180(self):
     """
     Test for when plon values are  -180
     """
     result = plon_type(-180)
     self.assertEqual(result, 180.0)
示例#6
0
 def test_plonType_negative(self):
     """
     Test of negative plon between -180 and 0
     """
     result = plon_type(-30)
     self.assertEqual(result, 330.0)
示例#7
0
 def test_plonType_positive(self):
     """
     Test of positive plon between 0 and 360
     """
     result = plon_type(30)
     self.assertEqual(result, 30.0)