1+ from sys import platform
2+
13import pytest
24
35from starknet_py .common import create_sierra_compiled_contract
1820from starknet_py .tests .e2e .fixtures .misc import load_contract
1921
2022
21- # TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec.
22- @pytest .mark .skip
23+ # TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup.
24+ @pytest .mark .skipif (
25+ platform == "win32" ,
26+ reason = "Testing Ledger is skipped on Windows due to different Speculos setup." ,
27+ )
2328def test_init_with_invalid_derivation_path ():
2429 with pytest .raises (ValueError , match = "Empty derivation path" ):
2530 LedgerSigner (derivation_path_str = "" , chain_id = StarknetChainId .SEPOLIA )
@@ -76,8 +81,11 @@ def test_init_with_invalid_derivation_path():
7681 ),
7782 ],
7883)
79- # TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec.
80- @pytest .mark .skip
84+ # TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup.
85+ @pytest .mark .skipif (
86+ platform == "win32" ,
87+ reason = "Testing Ledger is skipped on Windows due to different Speculos setup." ,
88+ )
8189def test_sign_transaction (transaction ):
8290 # docs: start
8391
@@ -97,8 +105,11 @@ def test_sign_transaction(transaction):
97105 assert all (i != 0 for i in signature )
98106
99107
100- # TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec.
101- @pytest .mark .skip
108+ # TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup.
109+ @pytest .mark .skipif (
110+ platform == "win32" ,
111+ reason = "Testing Ledger is skipped on Windows due to different Speculos setup." ,
112+ )
102113def test_create_account_with_ledger_signer ():
103114 # pylint: disable=unused-variable
104115 signer = LedgerSigner (
@@ -132,8 +143,11 @@ async def _get_account_balance_strk(client: FullNodeClient, address: int):
132143
133144
134145@pytest .mark .asyncio
135- # TODO (#1476): Should be re-enabled once Ledger signer is updated with new APDU spec.
136- @pytest .mark .skip
146+ # TODO (#1425): Currently Ledger tests are skipped on Windows due to different Speculos setup.
147+ @pytest .mark .skipif (
148+ platform == "win32" ,
149+ reason = "Testing Ledger is skipped on Windows due to different Speculos setup." ,
150+ )
137151async def test_deploy_account_and_transfer (client ):
138152 signer = LedgerSigner (
139153 derivation_path_str = "m/2645'/1195502025'/1470455285'/0'/0'/0" ,
0 commit comments