|
8 | 8 | from dataclasses import dataclass |
9 | 9 | from io import BytesIO |
10 | 10 | from pathlib import Path |
11 | | -from typing import Any, List, Optional, Tuple |
| 11 | +from typing import Any, Generator, List, Optional, Tuple |
12 | 12 | from urllib.parse import urlparse |
13 | 13 |
|
14 | 14 | import platformdirs |
|
29 | 29 | ) |
30 | 30 |
|
31 | 31 |
|
| 32 | +def print_migration_warning(terminalreporter: Any = None) -> None: |
| 33 | + """Print migration warning about repository merge.""" |
| 34 | + lines = [ |
| 35 | + "", |
| 36 | + "=" * 80, |
| 37 | + "⚠️ IMPORTANT: Repository Migration in Progress - 'The Weld' ⚠️", |
| 38 | + "=" * 80, |
| 39 | + "", |
| 40 | + "This repository is being merged into ethereum/execution-specs (EELS) during the", |
| 41 | + "week of October 20-24, 2025.", |
| 42 | + "", |
| 43 | + "📅 Timeline:", |
| 44 | + " • Week of Oct 13-17: Closing PRs, porting issues to EELS", |
| 45 | + " • Week of Oct 20-24: Migration week - fixing CI and fixture building", |
| 46 | + " • Oct 24 (ETA): Weld finalized - all development moves to EELS", |
| 47 | + "", |
| 48 | + "👉 What This Means:", |
| 49 | + " • Test Contributors: After Oct 24, reopen draft PRs in EELS", |
| 50 | + " • All future test development happens in EELS after completion", |
| 51 | + " • Fixture releases continue as usual during transition", |
| 52 | + "", |
| 53 | + "For details: https://steel.ethereum.foundation/blog/blog_posts/2025-09-11_weld-announcement/", |
| 54 | + "=" * 80, |
| 55 | + "", |
| 56 | + ] |
| 57 | + |
| 58 | + if terminalreporter: |
| 59 | + for line in lines: |
| 60 | + if "⚠️" in line or "IMPORTANT" in line: |
| 61 | + terminalreporter.write_line(line, bold=True, yellow=True) |
| 62 | + elif line.startswith("="): |
| 63 | + terminalreporter.write_line(line, yellow=True) |
| 64 | + else: |
| 65 | + terminalreporter.write_line(line) |
| 66 | + else: |
| 67 | + for line in lines: |
| 68 | + print(line) |
| 69 | + |
| 70 | + |
32 | 71 | def default_input() -> str: |
33 | 72 | """ |
34 | 73 | Directory (default) to consume generated test fixtures from. Defined as a |
@@ -374,6 +413,7 @@ def pytest_configure(config: pytest.Config) -> None: # noqa: D103 |
374 | 413 | called before the pytest-html plugin's pytest_configure to ensure that it |
375 | 414 | uses the modified `htmlpath` option. |
376 | 415 | """ |
| 416 | + print_migration_warning() |
377 | 417 | # Validate --extract-to usage |
378 | 418 | if config.option.extract_to_folder is not None and "cache" not in sys.argv: |
379 | 419 | pytest.exit("The --extract-to flag is only valid with the 'cache' command.") |
@@ -527,3 +567,17 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None: |
527 | 567 | metafunc.config.hive_execution_clients, # type: ignore[attr-defined] |
528 | 568 | ids=[client.name for client in metafunc.config.hive_execution_clients], # type: ignore[attr-defined] |
529 | 569 | ) |
| 570 | + |
| 571 | + |
| 572 | +@pytest.hookimpl(hookwrapper=True, trylast=True) |
| 573 | +def pytest_terminal_summary( |
| 574 | + terminalreporter: Any, |
| 575 | + exitstatus: int, |
| 576 | + config: pytest.Config, |
| 577 | +) -> Generator[None, None, None]: |
| 578 | + """Print migration warning at end of test session.""" |
| 579 | + del exitstatus |
| 580 | + yield |
| 581 | + |
| 582 | + if not hasattr(config, "workerinput"): |
| 583 | + print_migration_warning(terminalreporter) |
0 commit comments