Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Users can select any of the artifacts depending on their testing needs for their
### 📋 Misc

- 🔀 Use only relative imports in `tests/` directory ([#1848](https://github.com/ethereum/execution-spec-tests/pull/1848)).
- 🔀 Convert absolute imports to relative imports in `src/` directory for better code maintainability ([#1907](https://github.com/ethereum/execution-spec-tests/pull/1907)).
- 🔀 Misc. doc updates, including a navigation footer ([#1846](https://github.com/ethereum/execution-spec-tests/pull/1846)).
- 🔀 Remove Python 3.10 support ([#1808](https://github.com/ethereum/execution-spec-tests/pull/1808)).
- 🔀 Modernize codebase with Python 3.11 language features ([#1812](https://github.com/ethereum/execution-spec-tests/pull/1812)).
Expand Down
4 changes: 2 additions & 2 deletions src/cli/eest/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import click

from cli.eest.commands import clean, info
from cli.eest.make.cli import make
from .commands import clean, info
from .make.cli import make


@click.group(context_settings={"help_option_names": ["-h", "--help"], "max_content_width": 120})
Expand Down
4 changes: 1 addition & 3 deletions src/cli/eest/make/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

import click

from cli.eest.make.commands import create_default_env

from .commands import test
from .commands import create_default_env, test


@click.group(short_help="Generate project files.")
Expand Down
3 changes: 2 additions & 1 deletion src/cli/eest/make/commands/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import click
from jinja2 import Environment, PackageLoader

from cli.eest.quotes import get_quote
from config.env import ENV_PATH, Config

from ...quotes import get_quote


@click.command(short_help="Generate the default environment file (env.yaml).", name="env")
def create_default_env():
Expand Down
3 changes: 2 additions & 1 deletion src/cli/eest/make/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
import click
import jinja2

from cli.input import input_select, input_text
from config.docs import DocsConfig
from ethereum_test_forks import get_development_forks, get_forks

from ....input import input_select, input_text

template_loader = jinja2.PackageLoader("cli.eest.make")
template_env = jinja2.Environment(
loader=template_loader, keep_trailing_newline=True, trim_blocks=True, lstrip_blocks=True
Expand Down
3 changes: 2 additions & 1 deletion src/cli/eofwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import click

from cli.evm_bytes import OpcodeWithOperands, process_evm_bytes
from ethereum_clis import CLINotFoundInPathError
from ethereum_clis.clis.evmone import EvmOneTransitionTool
from ethereum_test_base_types import Bytes, EthereumTestRootModel
Expand All @@ -36,6 +35,8 @@
from ethereum_test_types.eof.v1 import Container
from ethereum_test_vm.bytecode import Bytecode

from .evm_bytes import OpcodeWithOperands, process_evm_bytes


@click.command()
@click.argument("input_path", type=click.Path(exists=True, dir_okay=True, file_okay=True))
Expand Down
5 changes: 3 additions & 2 deletions src/cli/gentest/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import pytest
from click.testing import CliRunner

from cli.gentest.cli import generate
from cli.gentest.test_context_providers import StateTestProvider
from ethereum_test_base_types import Account
from ethereum_test_tools import Environment, Storage, Transaction

from ..cli import generate
from ..test_context_providers import StateTestProvider

transactions_by_type = {
0: {
"environment": Environment(
Expand Down
3 changes: 2 additions & 1 deletion src/pytest_plugins/consume/simulators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from ethereum_test_fixtures.consume import TestCaseIndexFile, TestCaseStream
from ethereum_test_fixtures.file import Fixtures
from ethereum_test_rpc import EthRPC
from pytest_plugins.consume.consume import FixturesSource

from ..consume import FixturesSource


@pytest.fixture(scope="function")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from ethereum_test_fixtures import BlockchainEngineFixture
from ethereum_test_rpc import EngineRPC, EthRPC
from ethereum_test_rpc.types import ForkchoiceState, JSONRPCError, PayloadStatusEnum
from pytest_plugins.consume.simulators.helpers.exceptions import GenesisBlockMismatchExceptionError
from pytest_plugins.logging import get_logger

from ....logging import get_logger
from ..helpers.exceptions import GenesisBlockMismatchExceptionError
from ..helpers.timing import TimingData

logger = get_logger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

from ethereum_test_fixtures import BlockchainFixture
from ethereum_test_rpc import EthRPC
from pytest_plugins.consume.simulators.helpers.exceptions import GenesisBlockMismatchExceptionError

from ..helpers.exceptions import GenesisBlockMismatchExceptionError
from ..helpers.timing import TimingData

logger = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions src/pytest_plugins/consume/simulators/single_test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from ethereum_test_base_types import Number, to_json
from ethereum_test_fixtures import BlockchainFixtureCommon
from ethereum_test_fixtures.blockchain import FixtureHeader
from pytest_plugins.consume.simulators.helpers.ruleset import (

from .helpers.ruleset import (
ruleset, # TODO: generate dynamically
)

from .helpers.timing import TimingData

logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

from ethereum_test_fixtures import BaseFixture
from ethereum_test_fixtures.consume import TestCaseIndexFile, TestCaseStream
from pytest_plugins.pytest_hive.hive_info import ClientFile, HiveInfo

from ...pytest_hive.hive_info import ClientFile, HiveInfo

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from unittest.mock import MagicMock, patch

from pytest_plugins.consume.consume import CACHED_DOWNLOADS_DIRECTORY, FixturesSource
from ..consume import CACHED_DOWNLOADS_DIRECTORY, FixturesSource


class TestSimplifiedConsumeBehavior:
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_plugins/execute/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from ethereum_test_rpc import EngineRPC, EthRPC
from ethereum_test_tools import BaseTest
from ethereum_test_types import EnvironmentDefaults, TransactionDefaults
from pytest_plugins.spec_version_checker.spec_version_checker import EIPSpecTestItem

from ..shared.helpers import (
get_spec_format_for_item,
is_help_or_collectonly_mode,
labeled_format_parameter_set,
)
from ..spec_version_checker.spec_version_checker import EIPSpecTestItem
from .pre_alloc import Alloc


Expand Down
3 changes: 2 additions & 1 deletion src/pytest_plugins/execute/rpc/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
)
from ethereum_test_types import Requests
from ethereum_test_types.trie import keccak256
from pytest_plugins.consume.simulators.helpers.ruleset import ruleset

from ...consume.simulators.helpers.ruleset import ruleset


class HashList(RootModel[List[Hash]]):
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_plugins/filler/tests/test_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from ethereum_test_tools import Environment
from ethereum_clis import ExecutionSpecsTransitionTool, TransitionTool
from pytest_plugins.filler.filler import default_output_directory
from ..filler import default_output_directory


# flake8: noqa
Expand Down
3 changes: 2 additions & 1 deletion src/pytest_plugins/filler/tests/test_output_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from pytest import TempPathFactory

from ethereum_clis import TransitionTool
from pytest_plugins.filler.fixture_output import FixtureOutput

from ..fixture_output import FixtureOutput


@pytest.fixture(scope="module")
Expand Down
3 changes: 2 additions & 1 deletion src/pytest_plugins/shared/execute_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from ethereum_test_fixtures import BaseFixture, LabeledFixtureFormat
from ethereum_test_specs import BaseTest
from ethereum_test_types import EOA, Alloc
from pytest_plugins.spec_version_checker.spec_version_checker import EIPSpecTestItem

from ..spec_version_checker.spec_version_checker import EIPSpecTestItem


@pytest.hookimpl(tryfirst=True)
Expand Down
Loading