Changeset 290


Ignore:
Timestamp:
05/02/15 17:19:25 (4 years ago)
Author:
mjuckes
Message:

fix in tagged version for setup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/tags/1.3.1/ceda_cc/c4.py

    r287 r290  
    22import sys 
    33 
     4testmain=True 
    45## callout to summary.py: if this option is selected, imports of libraries are not needed. 
    5 if __name__ == '__main__' and sys.argv[1] == '--sum': 
     6if not testmain: 
     7  if __name__ == '__main__' and sys.argv[1] == '--sum': 
    68      import summary 
    79      summary.main() 
    810      raise SystemExit(0) 
    9 elif __name__ == '__main__' and sys.argv[1] == '-v': 
     11  elif __name__ == '__main__' and sys.argv[1] == '-v': 
    1012      from versionConfig import version, versionComment 
    1113      print 'ceda-cc version %s [%s]' % (version,versionComment) 
    1214      raise SystemExit(0) 
    13 elif __name__ == '__main__' and sys.argv[1] == '--unitTest': 
     15  elif __name__ == '__main__' and sys.argv[1] == '--unitTest': 
    1416      print "Starting test suite 1" 
    1517      import unitTestsS1 
     
    648650 
    649651def main_entry(): 
    650    """ 
     652  """ 
    651653   Wrapper around main() for use with setuptools. 
    652654 
    653    """ 
    654    main(printInfo=True) 
    655  
    656 if __name__ == '__main__': 
     655  """ 
    657656  if sys.argv[1] == '--sum': 
    658657      import summary 
    659658      summary.main() 
    660       raise SystemExit(0) 
     659  elif sys.argv[1] == '-v': 
     660      from versionConfig import version, versionComment 
     661      print 'ceda-cc version %s [%s]' % (version,versionComment) 
     662  elif sys.argv[1] == '--unitTest': 
     663      print "Starting test suite 1" 
     664      import unitTestsS1 
     665      print "Starting test suite 2" 
     666      import unitTestsS2 
     667      print "Tests completed" 
     668  else: 
     669     main(printInfo=True) 
     670 
     671if __name__ == '__main__': 
    661672  main_entry() 
    662673 
Note: See TracChangeset for help on using the changeset viewer.