Skip to content

Commit 9cf57a4

Browse files
committed
Add ids to utils functions test
1 parent 0e6e858 commit 9cf57a4

File tree

2 files changed

+178
-153
lines changed

2 files changed

+178
-153
lines changed

tests/core/contracts/test_contract_method_abi_encoding.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,42 @@
1414
@pytest.mark.parametrize(
1515
'abi,arguments,data,expected',
1616
(
17-
(ABI_A, [], None, '0x0dbe671f'),
18-
(ABI_A, [], '0x12345678', '0x12345678'),
19-
(
17+
pytest.param(ABI_A, [], None, '0x0dbe671f', id="ABI_A, no args, no data"),
18+
pytest.param(ABI_A, [], '0x12345678', '0x12345678', id="ABI_A, no args, some data"),
19+
pytest.param(
2020
ABI_B,
2121
[0],
2222
None,
2323
'0xf0fdf8340000000000000000000000000000000000000000000000000000000000000000',
24+
id='ABI_B, valid int args, no data'
2425
),
25-
(
26+
pytest.param(
2627
ABI_B,
2728
[1],
2829
None,
2930
'0xf0fdf8340000000000000000000000000000000000000000000000000000000000000001',
31+
id='ABI_B, valid int args, no data'
3032
),
31-
(
33+
pytest.param(
3234
ABI_C,
3335
[1],
3436
None,
3537
'0xf0fdf8340000000000000000000000000000000000000000000000000000000000000001',
38+
id='ABI_B, valid int args, no data'
3639
),
37-
(
40+
pytest.param(
3841
ABI_C,
3942
[b'a'],
4043
None,
4144
'0x9f3fab586100000000000000000000000000000000000000000000000000000000000000',
45+
id='ABI_C, valid byte args, no data'
4246
),
43-
(
47+
pytest.param(
4448
ABI_C,
4549
['0x61'],
4650
None,
4751
'0x9f3fab586100000000000000000000000000000000000000000000000000000000000000',
52+
id='ABI_C, valid hex args, no data'
4853
),
4954
),
5055
)
@@ -88,37 +93,42 @@ def test_contract_abi_encoding_strict_with_error(w3_strict_abi, arguments):
8893
@pytest.mark.parametrize(
8994
'abi,arguments,data,expected',
9095
(
91-
(ABI_A, [], None, '0x0dbe671f'),
92-
(ABI_A, [], '0x12345678', '0x12345678'),
93-
(
96+
pytest.param(ABI_A, [], None, '0x0dbe671f', id="ABI_A, no args, no data"),
97+
pytest.param(ABI_A, [], '0x12345678', '0x12345678', id="ABI_A, no args, some data"),
98+
pytest.param(
9499
ABI_B,
95100
[0],
96101
None,
97102
'0xf0fdf8340000000000000000000000000000000000000000000000000000000000000000',
103+
id='ABI_B, valid int args, no data'
98104
),
99-
(
105+
pytest.param(
100106
ABI_B,
101107
[1],
102108
None,
103109
'0xf0fdf8340000000000000000000000000000000000000000000000000000000000000001',
110+
id='ABI_B, valid int args, no data'
104111
),
105-
(
112+
pytest.param(
106113
ABI_C,
107114
[1],
108115
None,
109116
'0xf0fdf8340000000000000000000000000000000000000000000000000000000000000001',
117+
id='ABI_C, valid int args, no data'
110118
),
111-
(
119+
pytest.param(
112120
ABI_C,
113121
[b'00000000000000000000000000000000'],
114122
None,
115123
'0x9f3fab583030303030303030303030303030303030303030303030303030303030303030',
124+
id='ABI_C, valid bytestring args, no data'
116125
),
117-
(
126+
pytest.param(
118127
ABI_C,
119128
['0x0000000000000000000000000000000000000000000000000000000000000000'],
120129
None,
121130
'0x9f3fab580000000000000000000000000000000000000000000000000000000000000000',
131+
id='ABI_C, valid hexstring args, no data'
122132
),
123133
),
124134
)

0 commit comments

Comments
 (0)