Ignore:
Timestamp:
07/12/13 03:33:46 (6 years ago)
Author:
mjuckes
Message:

added specific file handle tracking test to unit test suite 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/unitTestsS2.py

    r101 r103  
    2525p = dummy() 
    2626p.log = log 
     27p.abortMessageCount = -1 
    2728p.pcfg = config.projectConfig( "__dummy" ) 
    2829 
     
    3233 
    3334fn = 'v1_t1_a_b_20060101-20101231.nc' 
    34 testId = '#01.001' 
     35testId = '#10.001' 
    3536c.check( fn ) 
    3637if c.errorCount == 0: 
    37   print 'Passed [%s] %s: valid file name' % (module,fn) 
     38  print 'OK [%s] %s: valid file name with project=__dummy' % (module,fn) 
    3839else: 
    3940  print 'Failed [%s] %s: valid file name' % (module,fn) 
    4041 
    4142 
    42 main( args=['-p', '__dummy'] ) 
     43testId = '#11.001' 
     44try: 
     45  m = main( args=['-p', '__dummy'], monitorFileHandles=True ) 
     46  print 'OK [%s]: dummy run completed without exception' % testId 
     47except: 
     48  print 'Failed [%s]: dummy run triggered exception' % testId 
     49  raise 
     50 
     51testId = '#11.002' 
     52if m.monitor.fhCountMax < 10: 
     53  print 'OK [%s]: fhCountMax = %s' % ( testId, m.monitor.fhCountMax ) 
     54else: 
     55  print 'Failed [%s]: fhCountMax = %s' % ( testId, m.monitor.fhCountMax ) 
     56 
     57testId = '#11.003' 
     58try: 
     59  m = main( args=['-p', '__dummy'], abortMessageCount=10 ) 
     60  print 'Failed [%s]: did not trigger exception' % testId 
     61except: 
     62  print 'OK [%s]: attempt to trigger exception successful' % testId 
Note: See TracChangeset for help on using the changeset viewer.