diff --git a/test/example-abis/example-contract-access_control.abi b/test/example-abis/example-contract-access_control.abi new file mode 100644 index 0000000..385286c Binary files /dev/null and b/test/example-abis/example-contract-access_control.abi differ diff --git a/test/example-abis/example-contract-average_salary.abi b/test/example-abis/example-contract-average_salary.abi new file mode 100644 index 0000000..738d555 Binary files /dev/null and b/test/example-abis/example-contract-average_salary.abi differ diff --git a/test/example-abis/example-contract-mia_game.abi b/test/example-abis/example-contract-mia_game.abi new file mode 100644 index 0000000..d5d54a3 Binary files /dev/null and b/test/example-abis/example-contract-mia_game.abi differ diff --git a/test/example-abis/example-contract-multi_voting_contract.abi b/test/example-abis/example-contract-multi_voting_contract.abi new file mode 100644 index 0000000..27366ba Binary files /dev/null and b/test/example-abis/example-contract-multi_voting_contract.abi differ diff --git a/test/example-abis/example-contract-nickname.abi b/test/example-abis/example-contract-nickname.abi new file mode 100644 index 0000000..46487bc Binary files /dev/null and b/test/example-abis/example-contract-nickname.abi differ diff --git a/test/example-abis/example-contract-petition.abi b/test/example-abis/example-contract-petition.abi new file mode 100644 index 0000000..6fe7a26 Binary files /dev/null and b/test/example-abis/example-contract-petition.abi differ diff --git a/test/example-abis/example-contract-ping_contract.abi b/test/example-abis/example-contract-ping_contract.abi new file mode 100644 index 0000000..ad68e4b Binary files /dev/null and b/test/example-abis/example-contract-ping_contract.abi differ diff --git a/test/example-abis/example-contract-voting.abi b/test/example-abis/example-contract-voting.abi new file mode 100644 index 0000000..9132cb0 Binary files /dev/null and b/test/example-abis/example-contract-voting.abi differ diff --git a/test/example-abis/example-contract-zk_immediate_open.abi b/test/example-abis/example-contract-zk_immediate_open.abi new file mode 100644 index 0000000..7ff08d9 Binary files /dev/null and b/test/example-abis/example-contract-zk_immediate_open.abi differ diff --git a/test/example-abis/example-contract-zk_multi_functional.abi b/test/example-abis/example-contract-zk_multi_functional.abi new file mode 100644 index 0000000..5fe6a88 Binary files /dev/null and b/test/example-abis/example-contract-zk_multi_functional.abi differ diff --git a/test/example-abis/example-contract-zk_second_price.abi b/test/example-abis/example-contract-zk_second_price.abi new file mode 100644 index 0000000..ea1f8bd Binary files /dev/null and b/test/example-abis/example-contract-zk_second_price.abi differ diff --git a/test/example-abis/example-contract-zk_statistics.abi b/test/example-abis/example-contract-zk_statistics.abi new file mode 100644 index 0000000..4580f21 Binary files /dev/null and b/test/example-abis/example-contract-zk_statistics.abi differ diff --git a/test/example-abis/example-contract-zk_struct_open.abi b/test/example-abis/example-contract-zk_struct_open.abi new file mode 100644 index 0000000..0de6cc4 Binary files /dev/null and b/test/example-abis/example-contract-zk_struct_open.abi differ diff --git a/test/example-abis/example-contract-zk_voting_simple.abi b/test/example-abis/example-contract-zk_voting_simple.abi new file mode 100644 index 0000000..bcb16ae Binary files /dev/null and b/test/example-abis/example-contract-zk_voting_simple.abi differ diff --git a/test/example-abis/mpc_token.abi b/test/example-abis/system-contract-mpc_token.abi similarity index 100% rename from test/example-abis/mpc_token.abi rename to test/example-abis/system-contract-mpc_token.abi diff --git a/test/test_parse_abi.py b/test/test_parse_abi.py index c714e95..42c643c 100644 --- a/test/test_parse_abi.py +++ b/test/test_parse_abi.py @@ -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