From 09e412baf8d69259753f178204bca10ad5964b1b Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 9 Jun 2025 17:32:54 +0000 Subject: [PATCH] tests: enable verbose stderr logging note: print() statements and stderr logging don't have a consistent printing order. Either can buffer log lines and flush them later, and the buffers are independent. --- tests/__init__.py | 2 +- tests/test_network.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 4fac041ca..624a3e3e0 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -19,7 +19,7 @@ from electrum.logging import Logger FAST_TESTS = False -electrum.logging._configure_stderr_logging() +electrum.logging._configure_stderr_logging(verbosity="*") electrum.util.AS_LIB_USER_I_WANT_TO_MANAGE_MY_OWN_ASYNCIO_LOOP = True diff --git a/tests/test_network.py b/tests/test_network.py index 8b2042cc0..682f4535b 100644 --- a/tests/test_network.py +++ b/tests/test_network.py @@ -38,7 +38,7 @@ class MockInterface(Interface): async def get_block_header(self, height: int, *, mode: ChainResolutionMode) -> dict: assert self.q.qsize() > 0, (height, mode) item = await self.q.get() - print("step with height", height, item) + self.logger.debug(f"step with {height=}. {item=}") assert item['block_height'] == height, (item['block_height'], height) assert mode in item['mock'], (mode, item) return item