File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,13 @@ printf '\n'
133133if [[ ${# failed_tests[@]} -gt 0 ]]; then
134134 printf " Failed tests:\n"
135135 for i in " ${failed_tests[@]} " ; do
136- printf " \n " * 5
137- printf " = " * 80
136+ printf ' \n%.s ' {1..5}
137+ printf ' =%.s ' {1..80}
138138 printf " ${tests[$i]} \n"
139- printf " - " * 80
139+ printf ' -%.s ' {1..80}
140140 # show the output of the failed test
141141 cat " parallel_test_output-$i .txt"
142- printf " = " * 80
142+ printf ' =%.s ' {1..80}
143143 done
144144else
145145 printf " All tests passed!\n"
Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ def leave_no_artifacts_behind():
197197 files_after = {p for p in tests_root .rglob ("*" ) if "__pycache__" not in p .parts }
198198 difference = files_after - files_before
199199 difference = {str (f .relative_to (tests_root )) for f in difference }
200+ # ignore the .coverage files
201+ difference = {f for f in difference if not f .endswith (".coverage" )}
200202 assert not difference , f"Test left artifacts behind: { difference } "
201203
202204
Original file line number Diff line number Diff line change @@ -312,12 +312,16 @@ def single_process_pg():
312312
313313@pytest .fixture (autouse = True )
314314def leave_no_artifacts_behind ():
315+ """Checks that no artifacts are left behind after the test."""
315316 tests_root = Path (__file__ ).parent .parent
317+ # Ignore the __pycache__ directories
316318 files_before = {p for p in tests_root .rglob ("*" ) if "__pycache__" not in p .parts }
317319 yield
318320 files_after = {p for p in tests_root .rglob ("*" ) if "__pycache__" not in p .parts }
319321 difference = files_after - files_before
320322 difference = {str (f .relative_to (tests_root )) for f in difference }
323+ # ignore the .coverage files
324+ difference = {f for f in difference if not f .endswith (".coverage" )}
321325 assert not difference , f"Test left artifacts behind: { difference } "
322326
323327
You can’t perform that action at this time.
0 commit comments