Changeset 29235 for branches/sc_branches/psps_testing/psi/psi_inquisitor.py
- Timestamp:
- Sep 24, 2010, 3:50:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sc_branches/psps_testing/psi/psi_inquisitor.py
r29227 r29235 135 135 # position... 136 136 values = line.split(',') 137 if len(values) != len(contents['fields']): 138 # I wonder if this test is relevant. 139 # We should trust the server response at least140 # at theprotocol level...137 if len(values) != len(contents['fields']): # pragma: no cover 138 # I wonder if this test is relevant. We should 139 # trust the server response at least at the 140 # protocol level... 141 141 raise Exception("Different array length? %d vs %d" 142 142 % (len(values), len(contents['fields']))) … … 154 154 if __name__ == '__main__': 155 155 import logging 156 PsPsLogger.set_stderr() 157 PsPsLogger.setLevel(logging.DEBUG) 158 import doctest 159 doctest.testmod() 156 import sys 157 PsPsLogger.setLevel(logging.INFO) 158 PsPsLogger.set_stdout() 159 current_argument_position = 1 160 while current_argument_position < len(sys.argv): 161 if sys.argv[current_argument_position] == '-debug': # pragma: no cover 162 PsPsLogger.set_stderr() 163 current_argument_position += 1 164 elif sys.argv[current_argument_position] == 'test': 165 print 'Running unittest for PsiInquisitor class' 166 import doctest 167 doctest.testmod(exclude_empty = True) 168 sys.exit(0)
Note:
See TracChangeset
for help on using the changeset viewer.
