handle nfc/vdsk enabled or not in unrelated tests

This commit is contained in:
Peter D. Gray 2023-02-24 09:19:27 -05:00
parent a1bc4617d1
commit 42abaf3bc9
No known key found for this signature in database
GPG Key ID: F0E6CC6AFC16CF7B
2 changed files with 4 additions and 1 deletions

View File

@ -608,6 +608,9 @@ def virtdisk_path(request, is_simulator, only_mk4):
def doit(fn):
# could use: ckcc.get_sim_root_dirs() here
if is_simulator():
get_setting = request.getfixturevalue('get_setting')
if not get_setting('vidsk', False):
raise pytest.xfail('virtdisk disabled')
assert os.path.isdir('../unix/work/VirtDisk')
return '../unix/work/VirtDisk/' + fn
elif sys.platform == 'darwin':

View File

@ -882,7 +882,7 @@ def test_import_dup_safe(N, clear_ms, make_multisig, offer_ms_import, need_keypr
menu = cap_menu()
assert f'{M}/{N}: {name}' in menu
assert len(menu) == 6 + num_wallets
assert (len(menu) - num_wallets) in [5, 6] # depending if NFC enabled or not
title, story = offer_ms_import(make_named('xxx-orig'))
assert 'Create new multisig wallet' in story