Annotate test_bech32m.py (#17215)

Annotate test_bech32m.py.
This commit is contained in:
Amine Khaldi 2024-01-09 16:08:14 +01:00 committed by GitHub
parent b6a9c1d6d6
commit c1c0e30237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -109,7 +109,6 @@ tests.wallet.did_wallet.test_did
tests.wallet.rpc.test_wallet_rpc
tests.wallet.simple_sync.test_simple_sync_protocol
tests.wallet.sync.test_wallet_sync
tests.wallet.test_bech32m
tests.wallet.test_chialisp
tests.wallet.test_puzzle_store
tests.wallet.test_singleton

View File

@ -6,7 +6,7 @@ from __future__ import annotations
from chia.util.bech32m import bech32_decode
def test_valid_imports():
def test_valid_imports() -> None:
test_strings = [
"A1LQFN3A",
"a1lqfn3a",
@ -18,11 +18,11 @@ def test_valid_imports():
"?1v759aa",
]
for test_str in test_strings:
hrp, data = bech32_decode(test_str)
_, data = bech32_decode(test_str)
assert data is not None
def test_invalid_imports():
def test_invalid_imports() -> None:
test_strings = [
f"{0x20}1xj0phk",
f"{0x7F}1g6xzxy",
@ -41,5 +41,5 @@ def test_invalid_imports():
"1p2gdwpf",
]
for test_str in test_strings:
hrp, data = bech32_decode(test_str)
_, data = bech32_decode(test_str)
assert data is None