Skip to content

Commit

Permalink
fix(fixtures): remove unused properties
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz committed Sep 30, 2024
1 parent 90f8d64 commit 6940bcb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/ethereum_test_fixtures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class BaseFixture(CamelModel):
output_file_extension: ClassVar[str] = ".json"
description: ClassVar[str] = "Unknown fixture format; it has not been set."

is_state_test: ClassVar[bool] = False
is_blockchain_test: ClassVar[bool] = False
is_verifiable: ClassVar[bool] = False

@classmethod
Expand Down
1 change: 0 additions & 1 deletion src/ethereum_test_fixtures/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ class FixtureCommon(BaseFixture):
Base blockchain test fixture model.
"""

is_blockchain_test: ClassVar[bool] = True
is_verifiable: ClassVar[bool] = True

fork: str = Field(..., alias="network")
Expand Down
1 change: 0 additions & 1 deletion src/ethereum_test_fixtures/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ class Fixture(BaseFixture):
fixture_format_name: ClassVar[str] = "state_test"
description: ClassVar[str] = "Tests that generate a state test fixture."

is_state_test: ClassVar[bool] = True
is_verifiable: ClassVar[bool] = True

env: FixtureEnvironment
Expand Down
8 changes: 4 additions & 4 deletions src/evm_transition_tool/geth.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from re import compile
from typing import Optional

from ethereum_test_fixtures import BlockchainFixture
from ethereum_test_fixtures import BlockchainFixture, StateFixture
from ethereum_test_forks import Fork

from .transition_tool import FixtureFormat, TransitionTool, dump_files_to_directory
Expand Down Expand Up @@ -83,10 +83,10 @@ def verify_fixture(
if debug_output_path:
command += ["--debug", "--json", "--verbosity", "100"]

if fixture_format.is_state_test:
if fixture_format == StateFixture:
assert self.statetest_subcommand, "statetest subcommand not set"
command.append(self.statetest_subcommand)
elif fixture_format.is_blockchain_test:
elif fixture_format == BlockchainFixture:
assert self.blocktest_subcommand, "blocktest subcommand not set"
command.append(self.blocktest_subcommand)
else:
Expand Down Expand Up @@ -131,7 +131,7 @@ def verify_fixture(
f"EVM test failed.\n{' '.join(command)}\n\n Error:\n{result.stderr.decode()}"
)

if fixture_format.is_state_test:
if fixture_format == StateFixture:
result_json = json.loads(result.stdout.decode())
if not isinstance(result_json, list):
raise Exception(f"Unexpected result from evm statetest: {result_json}")
Expand Down

0 comments on commit 6940bcb

Please sign in to comment.