review comments; importstyle; dissolve complex expression; ad test_ms_sign_simple to veryslow tests

This commit is contained in:
avirgovi 2022-05-24 22:50:04 +02:00
parent 149980ada8
commit 41bc984656
4 changed files with 10 additions and 13 deletions

View File

@ -712,8 +712,12 @@ class MultisigWallet:
assert node.privkey() == None # 'no privkeys plz'
except ValueError:
pass
# HACK but there is no difference extended_keys - just bech32 hrp
assert chain.ctype == expect_chain or expect_chain == "XRT" and chain.ctype == "XTN" # 'wrong chain'
if expect_chain == "XRT":
# HACK but there is no difference extended_keys - just bech32 hrp
assert chain.ctype == "XTN"
else:
assert chain.ctype == expect_chain # 'wrong chain'
depth = node.depth()

View File

@ -2,15 +2,7 @@
#
# needs local bitcoind in PATH
import os
import time
import uuid
import atexit
import socket
import shutil
import pytest
import tempfile
import subprocess
import os, time, uuid, atexit, socket, shutil, pytest, tempfile, subprocess
from authproxy import AuthServiceProxy, JSONRPCException
from base64 import b64encode, b64decode

View File

@ -8,7 +8,7 @@ markers =
veryslow: test takes more than 30 minutes realtime
qrcode: test uses or tests QR related features
unfinalized: test cases produces an unfinalized PSBT
manual: test cannot be combined with nay others, check for "fully done" in repl (then it will hang - kill it)
manual: test cannot be combined with any others, check for "fully done" in repl (then it will hang - kill it)
# DOES NOT WORK. see --disable-warnings instead
filterwarnings =

View File

@ -1190,6 +1190,7 @@ def fake_ms_txn():
return doit
@pytest.mark.veryslow
@pytest.mark.unfinalized
@pytest.mark.parametrize('addr_fmt', [AF_P2SH, AF_P2WSH, AF_P2WSH_P2SH] )
@pytest.mark.parametrize('num_ins', [ 2, 15 ])
@ -1726,7 +1727,7 @@ def test_iss6743(repeat, set_seed_words, sim_execfile, try_sign):
tp = BasicPSBT().parse(psbt_b4)
(hdr_xpub, hdr_path), = [(v,k) for v,k in tp.xpubs if k[0:4] == pack('<I', expect_xfp)]
from pycoin.encoding import b2a_hashed_base58
assert expect_xpub == b2a_hashed_base58(hdr_xpub[1:])
assert expect_xpub == b2a_hashed_base58(hdr_xpub)
assert derivation == path_to_str(unpack('<%dI' % (len(hdr_path) // 4),hdr_path))
# sign a multisig, with xpubs in globals