Changeset 7dd309a in sasview
- Timestamp:
- Jul 26, 2018 6:38:08 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 573c383
- Parents:
- dc71408
- git-author:
- Piotr Rozyczko <rozyczko@…> (07/26/18 06:37:44)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (07/26/18 06:38:08)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GUITests.py
r144fe21 r7dd309a 15 15 16 16 To get more verbose console output (recommended), use ``python GUITests.py -v`` 17 or modify tge VERBOSITY module variable.18 17 """ 19 18 … … 28 27 'perspectivesSuite', 29 28 ] 30 31 # Define output verbosity32 #VERBOSITY = 0 # quiet - just the total number of tests run and global result33 VERBOSITY = 1 # default - quiet + a dot for every successful test or a F for failure34 #VERBOSITY = 2 # verbose - default + help string of every test and the result35 29 36 30 # Prepare the general QApplication instance … … 196 190 if len(sys.argv) > 1: 197 191 user_suites = sys.argv[1:] 198 199 runner = unittest.TextTestRunner(verbosity=VERBOSITY) 192 errors = {} 200 193 for suite in user_suites: 201 194 # create the suite object from name 202 195 try: 196 203 197 suite_instance = globals()[suite]() 204 results = runner.run(suite_instance) 198 result=unittest.TextTestResult(sys.stdout,True,True) 199 print("\nRunning %d test cases for %s"%(suite_instance.countTestCases(), suite)) 200 result.buffer=True 201 suite_instance.run(result) 202 203 if not result.wasSuccessful(): 204 if len(result.errors) or len(result.failures): 205 errors[suite] = (result.errors, result.failures) 206 if len(result.errors): 207 print("\n============ Errors disovered ===================") 208 if len(result.failures): 209 print("\n============ Failures disovered =================") 210 else: 211 print("\nAll tests successful") 212 205 213 except KeyError: 214 print("Failure : %s "%str(ex)) 206 215 print("ERROR: Incorrect suite name: %s " % suite) 207 216 pass 217 218 if len(errors.keys())>0: 219 for suite, errors in errors.items(): 220 for r in errors[0]: 221 print("\nSuite: %s had following errors:\n %s : %s"%(suite, r[0], r[1])) 222 for r in errors[1]: 223 print("\nSuite: %s had following failures:\n %s : %s"%(suite, r[0], r[1])) 224 print("=================================================")
Note: See TracChangeset
for help on using the changeset viewer.