Fixing flakiness on test teardown.
@@ -108,6 +108,7 @@ Memory before: %s
processes_info = []
for proc in psutil.process_iter():
if proc.pid not in current_pids:
+ try:
processes_info.append(
'New Process: %s(%s) - %s' % (
proc.name(),
@@ -115,6 +116,8 @@ Memory before: %s
format_process_memory_info(proc.memory_info())
)
)
+ except psutil.NoSuchProcess:
+ pass # The process could've died in the meanwhile
after_curr_proc_memory_info = psutil.Process().memory_info()
