From 800edc6fcefd11cf485b2eb118db012e39e0f5de Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 7 Nov 2024 00:25:40 +0000 Subject: [PATCH] test: remove all calls to print() from deltachat-rpc-client tests They frequently fail in CI with `OSError: [Errno 9] Bad file descriptor`. --- deltachat-rpc-client/tests/test_iroh_webxdc.py | 6 ++---- deltachat-rpc-client/tests/test_something.py | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/deltachat-rpc-client/tests/test_iroh_webxdc.py b/deltachat-rpc-client/tests/test_iroh_webxdc.py index c798f6d3a..30c24a72a 100644 --- a/deltachat-rpc-client/tests/test_iroh_webxdc.py +++ b/deltachat-rpc-client/tests/test_iroh_webxdc.py @@ -7,8 +7,8 @@ If you want to debug iroh at rust-trace/log level set RUST_LOG=iroh_net=trace,iroh_gossip=trace """ +import logging import os -import sys import threading import time @@ -25,9 +25,7 @@ def path_to_webxdc(request): def log(msg): - print() - print("*" * 80 + "\n" + msg + "\n", file=sys.stderr) - print() + logging.info(msg) def setup_realtime_webxdc(ac1, ac2, path_to_webxdc): diff --git a/deltachat-rpc-client/tests/test_something.py b/deltachat-rpc-client/tests/test_something.py index 22f22a6a4..a53e8376a 100644 --- a/deltachat-rpc-client/tests/test_something.py +++ b/deltachat-rpc-client/tests/test_something.py @@ -57,8 +57,8 @@ def test_acfactory(acfactory) -> None: if event.progress == 1000: # Success break else: - print(event) - print("Successful configuration") + logging.info(event) + logging.info("Successful configuration") def test_configure_starttls(acfactory) -> None: