示例#1
0
文件: test_srs.py 项目: cloudera/hue
 def test13_attr_value(self):
     "Testing the attr_value() method."
     s1 = SpatialReference('WGS84')
     with self.assertRaises(TypeError):
         s1.__getitem__(0)
     with self.assertRaises(TypeError):
         s1.__getitem__(('GEOGCS', 'foo'))
     self.assertEqual('WGS 84', s1['GEOGCS'])
     self.assertEqual('WGS_1984', s1['DATUM'])
     self.assertEqual('EPSG', s1['AUTHORITY'])
     self.assertEqual(4326, int(s1['AUTHORITY', 1]))
     self.assertIsNone(s1['FOOBAR'])
示例#2
0
 def test13_attr_value(self):
     "Testing the attr_value() method."
     s1 = SpatialReference("WGS84")
     with self.assertRaises(TypeError):
         s1.__getitem__(0)
     with self.assertRaises(TypeError):
         s1.__getitem__(("GEOGCS", "foo"))
     self.assertEqual("WGS 84", s1["GEOGCS"])
     self.assertEqual("WGS_1984", s1["DATUM"])
     self.assertEqual("EPSG", s1["AUTHORITY"])
     self.assertEqual(4326, int(s1["AUTHORITY", 1]))
     self.assertIsNone(s1["FOOBAR"])
示例#3
0
 def test13_attr_value(self):
     "Testing the attr_value() method."
     s1 = SpatialReference('WGS84')
     with self.assertRaises(TypeError):
         s1.__getitem__(0)
     with self.assertRaises(TypeError):
         s1.__getitem__(('GEOGCS', 'foo'))
     self.assertEqual('WGS 84', s1['GEOGCS'])
     self.assertEqual('WGS_1984', s1['DATUM'])
     self.assertEqual('EPSG', s1['AUTHORITY'])
     self.assertEqual(4326, int(s1['AUTHORITY', 1]))
     self.assertIsNone(s1['FOOBAR'])
示例#4
0
 def test13_attr_value(self):
     "Testing the attr_value() method."
     s1 = SpatialReference("WGS84")
     with self.assertRaises(TypeError):
         s1.__getitem__(0)
     with self.assertRaises(TypeError):
         s1.__getitem__(("GEOGCS", "foo"))
     self.assertEqual("WGS 84", s1["GEOGCS"])
     self.assertEqual("WGS_1984", s1["DATUM"])
     self.assertEqual("EPSG", s1["AUTHORITY"])
     self.assertEqual(4326, int(s1["AUTHORITY", 1]))
     self.assertIsNone(s1["FOOBAR"])