Skip to content

Commit d7db6ed

Browse files
committed
all: Abstract fixtures, StateTest refactor (#354)
* all: abstract fixtures, convert StateTest into a BlockchainTest generator * fix: tox
1 parent 5ce00e7 commit d7db6ed

File tree

20 files changed

+1321
-1425
lines changed

20 files changed

+1321
-1425
lines changed

src/ethereum_test_tools/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,9 @@
1818
AccessList,
1919
Account,
2020
Auto,
21-
Block,
2221
EngineAPIError,
2322
Environment,
24-
Fixture,
25-
FixtureEngineNewPayload,
26-
Header,
2723
HistoryStorageAddress,
28-
HiveFixture,
2924
JSONEncoder,
3025
Removable,
3126
Storage,
@@ -46,22 +41,24 @@
4641
to_hash,
4742
to_hash_bytes,
4843
)
49-
from .filling.fill import fill_test
5044
from .reference_spec import ReferenceSpec, ReferenceSpecTypes
5145
from .spec import (
46+
BaseFixture,
5247
BaseTest,
5348
BaseTestConfig,
5449
BlockchainTest,
5550
BlockchainTestFiller,
5651
StateTest,
5752
StateTestFiller,
5853
)
54+
from .spec.blockchain.types import Block, Header
5955
from .vm import Opcode, OpcodeCallArg, Opcodes
6056

6157
__all__ = (
6258
"AccessList",
6359
"Account",
6460
"Auto",
61+
"BaseFixture",
6562
"BaseTest",
6663
"BaseTestConfig",
6764
"Block",
@@ -107,7 +104,6 @@
107104
"cost_memory_bytes",
108105
"eip_2028_transaction_data_cost",
109106
"eip_2028_transaction_data_cost",
110-
"fill_test",
111107
"to_address",
112108
"to_hash_bytes",
113109
"to_hash",

src/ethereum_test_tools/common/__init__.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,18 @@
2424
to_hash,
2525
to_hash_bytes,
2626
)
27+
from .json import to_json
2728
from .types import (
2829
AccessList,
2930
Account,
3031
Address,
3132
Alloc,
3233
Auto,
33-
Block,
3434
Bloom,
3535
Bytes,
3636
Environment,
37-
Fixture,
38-
FixtureBlock,
39-
FixtureEngineNewPayload,
40-
FixtureHeader,
4137
Hash,
42-
Header,
4338
HeaderNonce,
44-
HiveFixture,
45-
InvalidFixtureBlock,
4639
JSONEncoder,
4740
Number,
4841
Removable,
@@ -53,7 +46,6 @@
5346
alloc_to_accounts,
5447
serialize_transactions,
5548
str_or_none,
56-
to_json,
5749
withdrawals_root,
5850
)
5951

@@ -65,22 +57,14 @@
6557
"AddrBB",
6658
"Alloc",
6759
"Auto",
68-
"Block",
6960
"Bloom",
7061
"Bytes",
7162
"EngineAPIError",
7263
"EmptyTrieRoot",
7364
"Environment",
74-
"Fixture",
75-
"FixtureBlock",
76-
"FixtureEngineNewPayload",
77-
"FixtureHeader",
7865
"Hash",
79-
"Header",
8066
"HeaderNonce",
8167
"HistoryStorageAddress",
82-
"HiveFixture",
83-
"InvalidFixtureBlock",
8468
"JSONEncoder",
8569
"Number",
8670
"Removable",

0 commit comments

Comments
 (0)