More tests! These are based on: https://gitlab.com/partisiablockchain/language/example-contracts
Some checks failed
Python Package / Package (push) Failing after 23s
Some checks failed
Python Package / Package (push) Failing after 23s
This commit is contained in:
parent
3f564b9ac7
commit
8f09c19292
BIN
test/example-abis/example-contract-access_control.abi
Normal file
BIN
test/example-abis/example-contract-access_control.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-average_salary.abi
Normal file
BIN
test/example-abis/example-contract-average_salary.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-mia_game.abi
Normal file
BIN
test/example-abis/example-contract-mia_game.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-multi_voting_contract.abi
Normal file
BIN
test/example-abis/example-contract-multi_voting_contract.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-nickname.abi
Normal file
BIN
test/example-abis/example-contract-nickname.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-petition.abi
Normal file
BIN
test/example-abis/example-contract-petition.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-ping_contract.abi
Normal file
BIN
test/example-abis/example-contract-ping_contract.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-voting.abi
Normal file
BIN
test/example-abis/example-contract-voting.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-zk_immediate_open.abi
Normal file
BIN
test/example-abis/example-contract-zk_immediate_open.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-zk_multi_functional.abi
Normal file
BIN
test/example-abis/example-contract-zk_multi_functional.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-zk_second_price.abi
Normal file
BIN
test/example-abis/example-contract-zk_second_price.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-zk_statistics.abi
Normal file
BIN
test/example-abis/example-contract-zk_statistics.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-zk_struct_open.abi
Normal file
BIN
test/example-abis/example-contract-zk_struct_open.abi
Normal file
Binary file not shown.
BIN
test/example-abis/example-contract-zk_voting_simple.abi
Normal file
BIN
test/example-abis/example-contract-zk_voting_simple.abi
Normal file
Binary file not shown.
|
@ -4,7 +4,7 @@ from pbcabi.binaryreader import BinaryReader
|
|||
import pbcabi.model
|
||||
|
||||
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():
|
||||
print(EXAMPLE_ABIS_FOLDER)
|
||||
|
@ -13,6 +13,6 @@ def test_parse_abi_num():
|
|||
|
||||
@pytest.mark.parametrize('abi_file_path', EXAMPLE_ABIS)
|
||||
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()))
|
||||
assert contract_abi is not None
|
||||
|
|
Loading…
Reference in New Issue
Block a user