Changeset 2818 for trunk/test
- Timestamp:
- 07/02/13 10:38:18 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/test_scantable.py
r2802 r2818 149 149 'Orion_SiO', 'Orion_SiO']) 150 150 151 def test_set_sourcename(self): 152 s = self.st.copy() 153 newname = "TEST" 154 s.set_sourcename(newname) 155 assert_equal(s.get_sourcename(), [newname]*4) 156 151 157 def test_get_azimuth(self): 152 158 assert_almost_equal(self.st.get_azimuth()[0], 5.628767013) … … 194 200 assert_almost_equal(q1.stats(stat='max')[0], 2.66563416) 195 201 202 203 def test_average_time_weight(self): 204 weights = {'none': 236.61423, 205 'var' : 232.98752, 206 'tsys' : 236.37482, 207 'tint' : 236.61423, 208 'tintsys' : 236.37485, 209 'median' : 236.61423, 210 } 211 212 for k,v in weights.items(): 213 yield self.av_weight, k, v 214 215 def av_weight(self, weight, result): 216 out = self.st.average_time(weight=weight) 217 assert_almost_equals(max(out.get_spectrum(0)), result, 5) 218 196 219 @with_setup(tempdir_setup, tempdir_teardown) 197 220 def test_save(self): … … 203 226 (fname % 'txt', 'ASCII', False), 204 227 ] 205 for f ormat in formats:206 yield self.save, f ormat228 for fmt in formats: 229 yield self.save, fmt 207 230 208 231 def save(self, args):
Note:
See TracChangeset
for help on using the changeset viewer.