1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-22 13:21:03 +00:00

fix: improve debug writing in tests

[no changelog]
This commit is contained in:
M1nd3r 2024-11-25 10:38:24 +01:00
parent 05b16ca1ed
commit 1560c3f24f

View File

@ -1042,12 +1042,12 @@ class SessionDebugWrapper(Session):
return self._session.id return self._session.id
def _write(self, msg: t.Any) -> None: def _write(self, msg: t.Any) -> None:
print("writing message:", type(msg)) print("writing message:", msg.__class__.__name__)
self._session._write(self._filter_message(msg)) self._session._write(self._filter_message(msg))
def _read(self) -> t.Any: def _read(self) -> t.Any:
resp = self._filter_message(self._session._read()) resp = self._filter_message(self._session._read())
print("reading message:", type(resp)) print("reading message:", resp.__class__.__name__)
if self.actual_responses is not None: if self.actual_responses is not None:
self.actual_responses.append(resp) self.actual_responses.append(resp)
return resp return resp