test(rpc-client): Replace remaining print()s with logging (#6082)

This is to fix tests failing with `OSError: [Errno 9] Bad file descriptor`. Maybe stdout closes
earlier than stderr, before the test finishes, not sure. For reference, the previous commit removing
print()s is 800edc6fce.
This commit is contained in:
iequidoo
2026-01-09 11:57:44 -03:00
committed by iequidoo
parent c06f53cb86
commit ba4055b7df
3 changed files with 11 additions and 10 deletions

View File

@@ -2,6 +2,7 @@
from __future__ import annotations
import logging
import os
import pathlib
import platform
@@ -204,14 +205,13 @@ def log():
class Printer:
def section(self, msg: str) -> None:
print()
print("=" * 10, msg, "=" * 10)
logging.info("\n%s %s %s", "=" * 10, msg, "=" * 10)
def step(self, msg: str) -> None:
print("-" * 5, "step " + msg, "-" * 5)
logging.info("%s step %s %s", "-" * 5, msg, "-" * 5)
def indent(self, msg: str) -> None:
print(" " + msg)
logging.info(" " + msg)
return Printer()
@@ -261,7 +261,7 @@ def get_core_python_env(tmp_path_factory):
envs[core_version] = venv
python = find_path(venv, "python")
rpc_server_path = find_path(venv, "deltachat-rpc-server")
print(f"python={python}\nrpc_server={rpc_server_path}")
logging.info(f"Paths:\npython={python}\nrpc_server={rpc_server_path}")
return python, rpc_server_path
return get_versioned_venv