Changeset 13381
- Timestamp:
- 12/18/07 22:50:51 (7 months ago)
- Files:
-
- trunk/autotest/pymod/gdaltest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/autotest/pymod/gdaltest.py
r12620 r13381 291 291 new_stat = oBand.GetStatistics(1, 1) 292 292 for i in range(4): 293 294 # NOTE - mloskot: Poor man Nan/Inf value check. It's poor 295 # because we need to support old and buggy Python 2.3. 296 # Tested on Linux, Mac OS X and Windows, with Python 2.3/2.4/2.5. 297 sv = str(new_stat[i]).lower() 298 if sv.find('n') >= 0 or sv.find('i') >= 0 or sv.find('#') >= 0: 299 post_reason( 'NaN or Invinite value encountered '%'.' % sv ) 300 return 'fail' 301 293 302 if abs(new_stat[i]-check_approx_stat[i]) > stat_epsilon: 294 303 print … … 309 318 new_stat = oBand.GetStatistics(0, 1) 310 319 for i in range(4): 320 321 sv = str(new_stat[i]).lower() 322 if sv.find('n') >= 0 or sv.find('i') >= 0 or sv.find('#') >= 0: 323 post_reason( 'NaN or Invinite value encountered '%'.' % sv ) 324 return 'fail' 325 311 326 if abs(new_stat[i]-check_stat[i]) > stat_epsilon: 312 327 print
