Changes in test/utest_sasview.py [b54440d:aaf5e49] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/utest_sasview.py
rb54440d raaf5e49 44 44 n_errors = 0 45 45 n_failures = 0 46 46 47 47 for d in (dirs if dirs else os.listdir(test_root)): 48 48 49 49 # Check for modules to be skipped 50 50 if d in SKIPPED_DIRS: 51 51 continue 52 52 53 53 54 54 # Go through modules looking for unit tests … … 64 64 #print std_out 65 65 #sys.exit() 66 has_failed = True 66 67 m = re.search("Ran ([0-9]+) test", std_out) 67 68 if m is not None: 69 has_failed = False 68 70 n_tests += int(m.group(1)) 69 has_tests = True70 else:71 has_tests = False72 71 73 has_failed = "FAILED (" in std_out 74 m = re.search("FAILED \(.*errors=([0-9]+)", std_out) 72 m = re.search("FAILED \(errors=([0-9]+)\)", std_out) 75 73 if m is not None: 74 has_failed = True 76 75 n_errors += int(m.group(1)) 77 m = re.search("FAILED \(.*failures=([0-9]+)", std_out) 76 77 m = re.search("FAILED \(failures=([0-9]+)\)", std_out) 78 78 if m is not None: 79 has_failed = True 79 80 n_failures += int(m.group(1)) 80 81 if has_failed or not has_tests:81 82 if has_failed: 82 83 failed += 1 83 84 print("Result for %s (%s): FAILED" % (module_name, module_dir)) … … 101 102 print(" Test errors: %d" % n_errors) 102 103 print("----------------------------------------------") 103 104 104 105 return failed 105 106 … … 109 110 if run_tests(dirs=dirs, all=all)>0: 110 111 sys.exit(1) 111 112
Note: See TracChangeset
for help on using the changeset viewer.