Changeset 2309 for inundation/geospatial_data/test_geospatial_data.py
- Timestamp:
- Jan 31, 2006, 5:41:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/geospatial_data/test_geospatial_data.py
r2306 r2309 56 56 57 57 58 def test_get_attribute _values_1(self):58 def test_get_attributes_1(self): 59 59 from coordinate_transforms.geo_reference import Geo_reference 60 60 points = [[1.0, 2.1], [3.0, 5.3]] … … 67 67 assert allclose(P, [[1.0, 2.1], [3.0, 5.3]]) 68 68 69 V = G.get_attribute _values() #Simply get them69 V = G.get_attributes() #Simply get them 70 70 assert allclose(V, [2, 4]) 71 71 72 V = G.get_attribute _values('attribute') #Get by name72 V = G.get_attributes('attribute') #Get by name 73 73 assert allclose(V, [2, 4]) 74 74 75 75 76 def test_get_attribute _values_2(self):76 def test_get_attributes_2(self): 77 77 """Multiple attributes 78 78 """ … … 89 89 assert allclose(P, [[1.0, 2.1], [3.0, 5.3]]) 90 90 91 V = G.get_attribute _values() #Get default attribute91 V = G.get_attributes() #Get default attribute 92 92 assert allclose(V, [2, 4]) 93 93 94 V = G.get_attribute _values('a0') #Get by name94 V = G.get_attributes('a0') #Get by name 95 95 assert allclose(V, [0, 0]) 96 96 97 V = G.get_attribute _values('a1') #Get by name97 V = G.get_attributes('a1') #Get by name 98 98 assert allclose(V, [2, 4]) 99 99 100 V = G.get_attribute _values('a2') #Get by name100 V = G.get_attributes('a2') #Get by name 101 101 assert allclose(V, [79.4, -7]) 102 102 103 103 try: 104 V = G.get_attribute _values('hdnoatedu') #Invalid104 V = G.get_attributes('hdnoatedu') #Invalid 105 105 except AssertionError: 106 106 pass … … 166 166 #assert allclose(V, [2, 4]) 167 167 168 V = G.get_attribute _values('a0') #Get by name168 V = G.get_attributes('a0') #Get by name 169 169 assert allclose(V, [0, 0]) 170 170 171 V = G.get_attribute _values('a1') #Get by name171 V = G.get_attributes('a1') #Get by name 172 172 assert allclose(V, [2, 4]) 173 173 174 V = G.get_attribute _values('a2') #Get by name174 V = G.get_attributes('a2') #Get by name 175 175 assert allclose(V, [79.4, -7]) 176 176
Note: See TracChangeset
for help on using the changeset viewer.