From 0491efed0257dd0ac4946c177b6cd1653b54df8e Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Wed, 26 Feb 2025 22:59:34 +0100 Subject: [PATCH] fix(tests): don't wipe logs on emulator restart [no changelog] --- tests/emulators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/emulators.py b/tests/emulators.py index 4f69d1eaff..bd88e88aef 100644 --- a/tests/emulators.py +++ b/tests/emulators.py @@ -139,6 +139,7 @@ class EmulatorWrapper: if logs_dir is not None: src = Path(self.profile_dir.name) / "trezor.log" dst = Path(logs_dir) / f"trezor-{self.worker_id}.log" - shutil.move(src, dst) + with open(src, "rb") as src, open(dst, "ab") as dst: + shutil.copyfileobj(src, dst) self.profile_dir.cleanup()