Remove unused import and improve checksum regex pattern

Co-authored-by: k9ert <117085+k9ert@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-05 07:20:59 +00:00
parent f4932d8613
commit 3890b44c72

View file

@ -1,4 +1,3 @@
from asyncio.streams import FlowControlMixin
import json
import random
import re
@ -399,11 +398,13 @@ def test_account_map_combined_descriptor(funded_hot_wallet_1: Wallet):
# Should not have single-branch /0/* or /1/* in the descriptor
# Check that it doesn't end with /0/* followed by checksum or /1/* followed by checksum
assert not re.search(r'/0/\*#[a-z0-9]+$', descriptor_str), (
# Note: Descriptor checksums use charset "qpzry9x8gf2tvdw0s3jn54khce6mua7l" (lowercase + digits only)
# but we include uppercase for future-proofing
assert not re.search(r'/0/\*#[a-zA-Z0-9]+$', descriptor_str), (
f"Descriptor should not end with /0/* (receive only), "
f"got: {descriptor_str}"
)
assert not re.search(r'/1/\*#[a-z0-9]+$', descriptor_str), (
assert not re.search(r'/1/\*#[a-zA-Z0-9]+$', descriptor_str), (
f"Descriptor should not end with /1/* (change only), "
f"got: {descriptor_str}"
)