Ignore:
Timestamp:
04/02/15 14:40:16 (5 years ago)
Author:
mjuckes
Message:

cleaned unitTestsS2 to work with python 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/ceda_cc/unitTestsS2.py

    r276 r281  
    1 import logging, time, os 
     1import logging, time, os, sys 
    22import utils_c4 
    33import config_c4 as config 
     
    4242  print 'Failed [%s] %s: valid file name' % (module,fn) 
    4343 
    44 testId = '#11.001' 
    45 try: 
    46   m = main( args=['-p', '__dummy'], monitorFileHandles=True ) 
    47   print 'OK: [%s]: dummy run completed without exception' % testId 
    48 except: 
    49   print 'Failed [%s]: dummy run triggered exception' % testId 
    50   raise baseException( 'Failed [%s]: dummy run triggered exception' % testId ) 
     44if sys.version_info > (2,6): 
     45  ## monitoting file handles uses a "subprocess" method which is not available in python 2.6 
     46  testId = '#11.001' 
     47  try: 
     48    m = main( args=['-p', '__dummy'], monitorFileHandles=True ) 
     49    print 'OK: [%s]: dummy run completed without exception' % testId 
     50  except: 
     51    print 'Failed [%s]: dummy run triggered exception' % testId 
     52    raise baseException( 'Failed [%s]: dummy run triggered exception' % testId ) 
    5153 
    5254testId = '#11.002' 
Note: See TracChangeset for help on using the changeset viewer.