Changeset 5503 for anuga_work/development/Hinwood_2008/test_slope.py
- Timestamp:
- Jul 15, 2008, 5:00:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/Hinwood_2008/test_slope.py
r5494 r5503 38 38 actual = array([0,0.01,0.02,0.03]) 39 39 self.assert_ (allclose(dtimes, actual, 0.001)) 40 actual = array([0.5, 0.50 1, 0.502])40 actual = array([0.5, 0.5005, 0.5015]) 41 41 self.assert_ (allclose(depths, actual, 0.001)) 42 42 … … 111 111 self.assert_ (allclose(ensure_numeric(bands), actual, 0.001)) 112 112 113 def test_get_time_band(self):113 def not_used_test_get_time_band(self): 114 114 time = array([0,1,2,3,4,5]) 115 115 slopes = array([[10,12], … … 158 158 [10,20,30,40]]) 159 159 self.assert_ (allclose(band_quantity, actual, 0.001)) 160 161 def test_find_froude(self): 162 times_froude = array([0,1]) 163 locations_froude = array([0,1,2,3,4,5]) 164 froudes = array([[0,1,2,3,4,5], 165 [0,10,20,30,40,50]]) 166 times = array([0,0,1,1]) 167 locations = array([0.5, 1.5, 2.5, 3.5]) 168 froudes = find_froude(times_froude, locations_froude, 169 froudes, times, locations) 170 actual = array([0.5, 1.5, 25, 35]) 171 self.assert_ (allclose(ensure_numeric(froudes), actual, 0.001)) 172 173 160 174 161 175 if __name__ == "__main__": 162 176 163 177 suite = unittest.makeSuite(slopeTestCase,'test') 164 suite = unittest.makeSuite(slopeTestCase,'test_get_band')178 #suite = unittest.makeSuite(slopeTestCase,'test_find_froude') 165 179 166 180 runner = unittest.TextTestRunner() #verbosity=2)
Note: See TracChangeset
for help on using the changeset viewer.