1
0

More tests! These are based on: https://gitlab.com/partisiablockchain/language/example-contracts
Some checks failed
Python Package / Package (push) Failing after 23s

This commit is contained in:
Jon Michael Aanes 2024-04-08 14:07:31 +02:00
parent 3f564b9ac7
commit 8f09c19292
16 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@ from pbcabi.binaryreader import BinaryReader
import pbcabi.model import pbcabi.model
EXAMPLE_ABIS_FOLDER = Path.cwd() / 'test' / 'example-abis' EXAMPLE_ABIS_FOLDER = Path.cwd() / 'test' / 'example-abis'
EXAMPLE_ABIS = list(EXAMPLE_ABIS_FOLDER.glob('*.abi')) EXAMPLE_ABIS = [str(p.relative_to(EXAMPLE_ABIS_FOLDER)) for p in EXAMPLE_ABIS_FOLDER.glob('*.abi')]
def test_parse_abi_num(): def test_parse_abi_num():
print(EXAMPLE_ABIS_FOLDER) print(EXAMPLE_ABIS_FOLDER)
@ -13,6 +13,6 @@ def test_parse_abi_num():
@pytest.mark.parametrize('abi_file_path', EXAMPLE_ABIS) @pytest.mark.parametrize('abi_file_path', EXAMPLE_ABIS)
def test_parse_abi(abi_file_path): def test_parse_abi(abi_file_path):
with open(abi_file_path, 'rb') as f: with open(EXAMPLE_ABIS_FOLDER / abi_file_path, 'rb') as f:
contract_abi = pbcabi.model.FileAbi.read_from(BinaryReader(f.read())) contract_abi = pbcabi.model.FileAbi.read_from(BinaryReader(f.read()))
assert contract_abi is not None assert contract_abi is not None