From 2af73525fd4b090d902838558d7e01e2037790ac Mon Sep 17 00:00:00 2001 From: highlander Date: Thu, 26 Mar 2026 23:39:39 -0600 Subject: [PATCH] fix: add requires_message gate to BIP-85 tests BIP-85 tests only had requires_firmware("7.14.0") which means they run (and fail) when firmware reports 7.14.0 but the BIP-85 handler is not yet compiled in. Add requires_message("GetBip85Mnemonic") to setUp() so tests skip gracefully when the message type is unsupported, matching the pattern used by Solana/TRON/TON/Zcash tests. --- tests/test_msg_bip85.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_msg_bip85.py b/tests/test_msg_bip85.py index 5eb90c7c..fcfc589c 100644 --- a/tests/test_msg_bip85.py +++ b/tests/test_msg_bip85.py @@ -17,8 +17,12 @@ class TestMsgBip85(common.KeepKeyTest): - def test_bip85_12word_flow(self): + def setUp(self): + super().setUp() self.requires_firmware("7.14.0") + self.requires_message("GetBip85Mnemonic") + + def test_bip85_12word_flow(self): """12-word derivation: verify device goes through display flow and returns Success.""" self.setup_mnemonic_allallall() @@ -26,7 +30,6 @@ def test_bip85_12word_flow(self): self.assertIsInstance(resp, proto.Success) def test_bip85_24word_flow(self): - self.requires_firmware("7.14.0") """24-word derivation: verify display flow and Success.""" self.setup_mnemonic_allallall() @@ -34,7 +37,6 @@ def test_bip85_24word_flow(self): self.assertIsInstance(resp, proto.Success) def test_bip85_different_indices_different_flows(self): - self.requires_firmware("7.14.0") """Index 0 and index 1 must both succeed.""" self.setup_mnemonic_allallall() @@ -43,7 +45,6 @@ def test_bip85_different_indices_different_flows(self): self.assertIsInstance(resp, proto.Success) def test_bip85_invalid_word_count(self): - self.requires_firmware("7.14.0") """Invalid word_count (15) must be rejected by firmware.""" self.setup_mnemonic_allallall() @@ -53,7 +54,6 @@ def test_bip85_invalid_word_count(self): self.assertIn('word_count', str(ctx.exception)) def test_bip85_18word_flow(self): - self.requires_firmware("7.14.0") """18-word derivation: verify the third word_count variant works.""" self.setup_mnemonic_allallall() @@ -61,7 +61,6 @@ def test_bip85_18word_flow(self): self.assertIsInstance(resp, proto.Success) def test_bip85_deterministic_flow(self): - self.requires_firmware("7.14.0") """Same parameters must produce identical results both times.""" self.setup_mnemonic_allallall()