Skip to content

Commit

Permalink
fix: unwind conftest logging change
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkaye97 committed Feb 8, 2025
1 parent 438708d commit cd79852
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def worker(

time.sleep(5)

def log_output(pipe: BytesIO) -> None:
def log_output(pipe: BytesIO, log_func: Callable[[str], None]) -> None:
for line in iter(pipe.readline, b""):
print(line.decode().strip())
log_func(line.decode().strip())

Thread(target=log_output, args=(proc.stdout, ), daemon=True).start()
Thread(target=log_output, args=(proc.stderr,), daemon=True).start()
Thread(target=log_output, args=(proc.stdout, logging.info), daemon=True).start()
Thread(target=log_output, args=(proc.stderr, logging.error), daemon=True).start()

yield proc

Expand Down

0 comments on commit cd79852

Please sign in to comment.