Skip to content

chore(deps,pytest): update pytest to v8 #1433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 20, 2025
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 @@ -32,6 +32,7 @@ The output behavior of `fill` has changed ([#1608](https://github.com/ethereum/e
- ✨ Added [Post-Mortems of Missed Test Scenarios](https://eest.ethereum.org/main/writing_tests/post_mortems/) to the documentation that serves as a reference list of all cases that were missed during the test implementation phase of a new EIP, and includes the steps taken in order to prevent similar test cases to be missed in the future ([#1327](https://github.com/ethereum/execution-spec-tests/pull/1327)).
- ✨ Added a new `eest` sub-command, `eest info`, to easily print a cloned EEST repository's version and the versions of relevant tools, e.g., `python`, `uv` ([#1621](https://github.com/ethereum/execution-spec-tests/pull/1621)).
- ✨ Add `CONTRIBUTING.md` for execution-spec-tests and improve coding standards documentation ([#1604](https://github.com/ethereum/execution-spec-tests/pull/1604)).
- 🔀 Updated from pytest 7 to [pytest 8](https://docs.pytest.org/en/stable/changelog.html#features-and-improvements), benefits include improved type hinting and hook typing, stricter mark handling, and clearer error messages for plugin and metadata development [#1433](https://github.com/ethereum/execution-spec-tests/pull/1433).

### 🧪 Test Cases

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"requests>=2.31.0,<3",
"requests_unixsocket2>=0.4.0",
"colorlog>=6.7.0,<7",
"pytest>7.3.2,<8",
"pytest>=8,<9",
"pytest-custom-report>=1.0.1,<2",
"pytest-html>=4.1.0,<5",
"pytest-metadata>=3,<4",
Expand Down
1 change: 0 additions & 1 deletion src/pytest_plugins/consume/hive_simulators/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ def total_timing_data(request) -> Generator[TimingData, None, None]:


@pytest.fixture(scope="function")
@pytest.mark.usefixtures("total_timing_data")
def client_genesis(fixture: BlockchainFixtureCommon) -> dict:
"""Convert the fixture genesis block header and pre-state to a client genesis state."""
genesis = to_json(fixture.genesis)
Expand Down
14 changes: 10 additions & 4 deletions src/pytest_plugins/filler/static_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

import pytest
import yaml
from _pytest.fixtures import FixtureRequest
from _pytest.fixtures import TopRequest
from _pytest.mark import ParameterSet
from _pytest.python import Module

from ethereum_test_fixtures import BaseFixture, LabeledFixtureFormat
from ethereum_test_forks import Fork
Expand Down Expand Up @@ -129,7 +130,13 @@ def pytest_collect_file(file_path: Path, parent) -> pytest.Collector | None:
# No formats registered, so no need to collect any files.
return None
if file_path.suffix in (".json", ".yml", ".yaml"):
return FillerFile.from_parent(parent, path=file_path)
init_file = file_path.parent / "__init__.py"
module = Module.from_parent(
parent=parent,
path=init_file,
nodeid=str(init_file),
)
return FillerFile.from_parent(module, path=file_path)
return None


Expand Down Expand Up @@ -315,9 +322,8 @@ def setup(self):
self,
None,
None,
funcargs=False,
)
request = FixtureRequest(self, _ispytest=True)
request = TopRequest(self, _ispytest=True)
for fixture_name in self.fixturenames:
self.params[fixture_name] = request.getfixturevalue(fixture_name)

Expand Down
8 changes: 4 additions & 4 deletions tests/berlin/eip2930_access_list/test_tx_intrinsic_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
pytest.param(Bytes(b"0x00FF"), id="data_1_zero_byte_1_non_zero_byte"),
pytest.param(Bytes(b"0xFE00"), id="data_1_zero_byte_1_non_zero_byte_reversed"),
pytest.param(Bytes(b"0x0102030405060708090A0B0C0D0E0F10"), id="data_set_1"),
pytest.param(
Bytes(b"0x0102030405060708090A0B0C0D0E0F101112131415161718191a1b1c1d1e1f20"),
id="data_set_1",
),
pytest.param(
Bytes(b"0x00010203040506000708090A0B0C0D0E0F10111200131415161718191a1b1c1d1e1f"),
id="data_set_2",
),
pytest.param(
Bytes(b"0x0102030405060708090A0B0C0D0E0F101112131415161718191a1b1c1d1e1f20"),
id="data_set_3",
),
pytest.param(
Bytes(b"0x01020304050607080910111213141516171819202122232425262728293031"),
id="data_set_31_bytes",
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading