Skip to content

Commit 7a82680

Browse files
committed
change yielded test name to a yielded test tag.
1 parent 0bafdd1 commit 7a82680

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

fillers/eips/eip3651.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def test_warm_coinbase_call_out_of_gas(fork):
160160
pre=pre,
161161
post=post,
162162
txs=[tx],
163-
name="opcode_" + opcode,
163+
tag="opcode_" + opcode,
164164
)
165165

166166

@@ -265,5 +265,5 @@ def test_warm_coinbase_gas_usage(fork):
265265
pre=pre,
266266
post=post,
267267
txs=[tx],
268-
name="opcode_" + opcode.lower(),
268+
tag="opcode_" + opcode.lower(),
269269
)

fillers/eips/eip3855.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_push0(fork):
4545
pre[addr_1] = Account(code=code)
4646
post[addr_1] = Account(storage={0x00: 0x01})
4747

48-
yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="key_sstore")
48+
yield StateTest(env=env, pre=pre, post=post, txs=[tx], tag="key_sstore")
4949

5050
"""
5151
Test case 2: Fill stack with PUSH0, then OR all values and save using
@@ -58,7 +58,7 @@ def test_push0(fork):
5858
pre[addr_1] = Account(code=code)
5959
post[addr_1] = Account(storage={0x00: 0x01})
6060

61-
yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="fill_stack")
61+
yield StateTest(env=env, pre=pre, post=post, txs=[tx], tag="fill_stack")
6262

6363
"""
6464
Test case 3: Stack overflow by using PUSH0 1025 times
@@ -70,7 +70,7 @@ def test_push0(fork):
7070
post[addr_1] = Account(storage={0x00: 0x00})
7171

7272
yield StateTest(
73-
env=env, pre=pre, post=post, txs=[tx], name="stack_overflow"
73+
env=env, pre=pre, post=post, txs=[tx], tag="stack_overflow"
7474
)
7575

7676
"""
@@ -84,7 +84,7 @@ def test_push0(fork):
8484
post[addr_1] = Account(storage={0x00: 0x02, 0x01: 0x00})
8585

8686
yield StateTest(
87-
env=env, pre=pre, post=post, txs=[tx], name="storage_overwrite"
87+
env=env, pre=pre, post=post, txs=[tx], tag="storage_overwrite"
8888
)
8989

9090
"""
@@ -114,7 +114,7 @@ def test_push0(fork):
114114
post[addr_1] = Account(storage={0x00: 0x01, 0x01: 0xFF})
115115

116116
yield StateTest(
117-
env=env, pre=pre, post=post, txs=[tx], name="during_staticcall"
117+
env=env, pre=pre, post=post, txs=[tx], tag="during_staticcall"
118118
)
119119

120120
del pre[addr_2]
@@ -137,7 +137,7 @@ def test_push0(fork):
137137
post[addr_1] = Account(storage={0x00: 0x01})
138138

139139
yield StateTest(
140-
env=env, pre=pre, post=post, txs=[tx], name="before_jumpdest"
140+
env=env, pre=pre, post=post, txs=[tx], tag="before_jumpdest"
141141
)
142142

143143
"""
@@ -151,4 +151,4 @@ def test_push0(fork):
151151
pre[addr_1] = Account(code=code)
152152
post[addr_1] = Account(storage={0x00: 0x02})
153153

154-
yield StateTest(env=env, pre=pre, post=post, txs=[tx], name="gas_cost")
154+
yield StateTest(env=env, pre=pre, post=post, txs=[tx], tag="gas_cost")

fillers/eips/eip3860.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def calculate_create_tx_execution_cost(
167167

168168
SINGLE_BYTE_INITCODE = Initcode(
169169
deploy_code=bytes(),
170-
name="single_byte",
170+
name="single_byte_initcode",
171171
)
172172
SINGLE_BYTE_INITCODE.bytecode = Op.STOP
173173
SINGLE_BYTE_INITCODE.deployment_gas = 0
@@ -225,7 +225,7 @@ def generate_tx_initcode_limit_test_cases(
225225
post=post,
226226
blocks=[block],
227227
genesis_environment=env,
228-
name=f"{initcode.name}",
228+
tag=f"{initcode.name}",
229229
)
230230

231231

@@ -315,7 +315,7 @@ def generate_gas_cost_test_cases(
315315
post=post,
316316
blocks=[block],
317317
genesis_environment=env,
318-
name=f"{initcode.name}_exact_intrinsic_gas",
318+
tag=f"{initcode.name}_exact_intrinsic_gas",
319319
)
320320

321321
"""
@@ -341,7 +341,7 @@ def generate_gas_cost_test_cases(
341341
post=post,
342342
blocks=[block],
343343
genesis_environment=env,
344-
name=f"{initcode.name}_under_intrinsic_gas",
344+
tag=f"{initcode.name}_under_intrinsic_gas",
345345
)
346346

347347
"""
@@ -367,7 +367,7 @@ def generate_gas_cost_test_cases(
367367
post=post,
368368
blocks=[block],
369369
genesis_environment=env,
370-
name=f"{initcode.name}_under_execution_gas",
370+
tag=f"{initcode.name}_under_execution_gas",
371371
)
372372

373373
"""
@@ -388,7 +388,7 @@ def generate_gas_cost_test_cases(
388388
post=post,
389389
blocks=[block],
390390
genesis_environment=env,
391-
name=f"{initcode.name}_exact_execution_gas",
391+
tag=f"{initcode.name}_exact_execution_gas",
392392
)
393393

394394

@@ -602,7 +602,7 @@ def generate_create_opcode_initcode_test_cases(
602602
pre=pre,
603603
post=post,
604604
txs=[tx],
605-
name=f"{initcode.name}",
605+
tag=f"{initcode.name}",
606606
)
607607

608608

fillers/withdrawals/withdrawals.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def test_multiple_withdrawals_same_address(_):
333333
pre=pre,
334334
post=post,
335335
blocks=blocks,
336-
name="multiple_blocks",
336+
tag="multiple_blocks",
337337
)
338338

339339

@@ -494,7 +494,7 @@ def test_newly_created_contract(_):
494494
post[created_contract].balance = 2 * ONE_GWEI
495495

496496
yield BlockchainTest(
497-
pre=pre, post=post, blocks=[block], name="with_tx_value"
497+
pre=pre, post=post, blocks=[block], tag="with_tx_value"
498498
)
499499

500500

@@ -647,7 +647,7 @@ def test_zero_amount(_):
647647
block.withdrawals.append(withdrawal_2)
648648
post[to_address(0x200)].balance = ONE_GWEI
649649
yield BlockchainTest(
650-
pre=pre, post=post, blocks=[block], name="with_extra_positive_amount"
650+
pre=pre, post=post, blocks=[block], tag="with_extra_positive_amount"
651651
)
652652

653653
# Same test but add another withdrawal with max amount in same
@@ -662,15 +662,15 @@ def test_zero_amount(_):
662662
post[to_address(0x300)].balance = (2**64 - 1) * ONE_GWEI
663663

664664
yield BlockchainTest(
665-
pre=pre, post=post, blocks=[block], name="with_extra_max_amount"
665+
pre=pre, post=post, blocks=[block], tag="with_extra_max_amount"
666666
)
667667

668668
# Same test but reverse order of withdrawals.
669669
block.withdrawals.reverse()
670670
set_withdrawal_index(block.withdrawals)
671671

672672
yield BlockchainTest(
673-
pre=pre, post=post, blocks=[block], name="reverse_withdrawal_order"
673+
pre=pre, post=post, blocks=[block], tag="reverse_withdrawal_order"
674674
)
675675

676676

src/ethereum_test_tools/filling/fill.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def fill_test(
4949
eips=eips,
5050
)
5151
except Exception as e:
52-
print(f"Exception during test '{test.name}'")
52+
print(f"Exception during test '{test.tag}'")
5353
raise e
5454

5555
fixture = Fixture(
@@ -63,7 +63,7 @@ def fill_test(
6363
pre_state=copy(test.pre),
6464
post_state=alloc_to_accounts(alloc),
6565
seal_engine=engine,
66-
name=test.name,
66+
name=test.tag,
6767
index=index,
6868
)
6969
fixture.fill_info(t8n, b11r)

src/ethereum_test_tools/spec/base_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class BaseTest:
8686
"""
8787

8888
pre: Mapping[str, Account]
89-
name: str = ""
89+
tag: str = ""
9090

9191
@abstractmethod
9292
def make_genesis(

src/ethereum_test_tools/spec/blockchain_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BlockchainTest(BaseTest):
4343
post: Mapping[str, Account]
4444
blocks: List[Block]
4545
genesis_environment: Environment = Environment()
46-
name: str = ""
46+
tag: str = ""
4747

4848
def make_genesis(
4949
self,

src/ethereum_test_tools/spec/state_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class StateTest(BaseTest):
4242
pre: Mapping[str, Account]
4343
post: Mapping[str, Account]
4444
txs: List[Transaction]
45-
name: str = ""
45+
tag: str = ""
4646

4747
def make_genesis(
4848
self,

0 commit comments

Comments
 (0)