- Timestamp:
- Sep 24, 2010, 3:50:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/psps_testing/utilities/configuration.py
r29227 r29235 19 19 20 20 def __repr__(self): 21 """ 22 >>> print Configuration() 23 Tests Configuration Values: 24 File extension: [.tar.gz] 25 Batch manifest name: [BatchManifest.xml] 26 XSD file: [data/xsd/BatchManifest.xsd] 27 XML validation tool: [/usr/bin/xmllint] 28 Limit for test failure in a single test item: [15] 29 Tolerance for floating-point comparison: [1e-05] 30 Different types comparison [never] fails 31 >>> Configuration.BE_TYPE_TOLERANT = False 32 >>> print Configuration() 33 Tests Configuration Values: 34 File extension: [.tar.gz] 35 Batch manifest name: [BatchManifest.xml] 36 XSD file: [data/xsd/BatchManifest.xsd] 37 XML validation tool: [/usr/bin/xmllint] 38 Limit for test failure in a single test item: [15] 39 Tolerance for floating-point comparison: [1e-05] 40 Different types comparison [always] fails 41 """ 21 42 from StringIO import StringIO 22 43 representation = StringIO() … … 41 62 % tolerant) 42 63 return representation.getvalue() 64 65 ################################################################ 66 # 67 # __main__ 68 # 69 ################################################################ 70 if __name__ == '__main__': 71 import logging 72 import sys 73 # Logging 74 from utilities.psps_logger import PsPsLogger 75 PsPsLogger.setLevel(logging.DEBUG) 76 current_argument_position = 1 77 while current_argument_position < len(sys.argv): 78 if sys.argv[current_argument_position] == '-debug': # pragma: no cover 79 PsPsLogger.set_stderr() 80 current_argument_position += 1 81 elif sys.argv[current_argument_position] == 'test': 82 print 'Running unittest for Configuration class' 83 import doctest 84 doctest.testmod() 85 sys.exit(0)
Note:
See TracChangeset
for help on using the changeset viewer.
