Add marker for QR-related tests
This commit is contained in:
parent
eee23fc4a2
commit
d582fdee98
@ -21,6 +21,9 @@ None of this code ships on the product itself, but it does get used for testing
|
||||
|
||||
--dev --manual -s
|
||||
|
||||
- test all QR code relates cases with:
|
||||
py.test -m qrcode
|
||||
|
||||
## PSBT reference files
|
||||
|
||||
- examples with `IN_REDEEM_SCRIPT`:
|
||||
|
||||
@ -5,3 +5,4 @@ markers =
|
||||
bitcoind: indicates local bitcoind (testnet) will be needed
|
||||
onetime: test cant be combined with any others, likely needs board reset
|
||||
veryslow: test takes more than 30 minutes realtime
|
||||
qrcode: test uses or tests QR related features
|
||||
|
||||
@ -24,6 +24,7 @@ def test_show_addr_usb(dev, need_keypress, addr_vs_path, path, addr_fmt, is_simu
|
||||
# check expected addr was used
|
||||
addr_vs_path(addr, path, addr_fmt)
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('path', [ 'm', "m/1/2", "m/1'/100'"])
|
||||
@pytest.mark.parametrize('addr_fmt', [ AF_CLASSIC, AF_P2WPKH, AF_P2WPKH_P2SH ])
|
||||
@pytest.mark.parametrize('show_qr', [ False, True ])
|
||||
|
||||
@ -256,6 +256,7 @@ def test_account_menu(account_num, sim_execfile, pick_menu_item, goto_address_ex
|
||||
|
||||
# NOTE: (2**31)-1 = 0x7fff_ffff = 2147483647
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('path', [
|
||||
"m/1'/{idx}",
|
||||
"m/2147483647/2147483647/2147483647'/2147483647/2147483647/2147483647'/2147483647/2147483647",
|
||||
|
||||
@ -177,6 +177,7 @@ def test_bip_vectors(mode, index, entropy, expect,
|
||||
|
||||
HISTORY = set()
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('mode,pattern', [
|
||||
('WIF (privkey)', r'[1-9A-HJ-NP-Za-km-z]{51,52}' ),
|
||||
('XPRV (BIP-32)', r'[tx]prv[1-9A-HJ-NP-Za-km-z]{107}'),
|
||||
|
||||
@ -1395,6 +1395,7 @@ def test_value_render(units, fake_txn, start_sign, cap_story, settings_set, sett
|
||||
|
||||
settings_remove('rz')
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('num_in', [1,2,3])
|
||||
@pytest.mark.parametrize('num_out', [1,2,3])
|
||||
def test_qr_txn(num_in, num_out, request, fake_txn, try_sign, dev, cap_screen_qr, qr_quality_check, cap_story, need_keypress):
|
||||
|
||||
@ -114,6 +114,7 @@ def pass_word_quiz(need_keypress, cap_story):
|
||||
|
||||
return doit
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('multisig', [False, 'multisig'])
|
||||
def test_make_backup(multisig, goto_home, pick_menu_item, cap_story, need_keypress, open_microsd, microsd_path, unit_test, cap_menu, word_menu_entry, pass_word_quiz, reset_seed_words, import_ms_wallet, get_setting, cap_screen_qr):
|
||||
# Make an encrypted 7z backup, verify it, and even restore it!
|
||||
@ -238,6 +239,7 @@ def test_make_backup(multisig, goto_home, pick_menu_item, cap_story, need_keypre
|
||||
reset_seed_words()
|
||||
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('seed_words, xfp', [
|
||||
( 'abandon ' * 11 + 'about', 0x0adac573),
|
||||
( 'abandon ' * 17 + 'agent', 0xc38a8be0),
|
||||
@ -321,6 +323,7 @@ def test_all_bip39_words(pos, goto_home, pick_menu_item, cap_story, need_keypres
|
||||
|
||||
reset_seed_words()
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('count', [20, 51, 99, 104])
|
||||
def test_import_from_dice(count, goto_home, pick_menu_item, cap_story, need_keypress, unit_test, cap_menu, word_menu_entry, get_secrets, reset_seed_words, cap_screen, cap_screen_qr, qr_quality_check):
|
||||
import random
|
||||
@ -594,7 +597,7 @@ def test_bip39_complex(target, goto_home, pick_menu_item, cap_story,
|
||||
assert get_pp_sofar() == target
|
||||
|
||||
|
||||
|
||||
@pytest.mark.qrcode
|
||||
@pytest.mark.parametrize('mode', ['words', 'xprv', 'ms'])
|
||||
@pytest.mark.parametrize('b39_word', ['', 'AbcZz1203'])
|
||||
def test_show_seed(mode, b39_word, goto_home, pick_menu_item, cap_story, need_keypress, sim_exec,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user