forked from ethereum/execution-spec-tests
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pytest: compile Yul with --target-version shanghai when fork is cancun
- Loading branch information
1 parent
8636cf6
commit be8bb66
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Pytest (plugin) definitions local to Cancun tests. | ||
""" | ||
import warnings | ||
|
||
import pytest | ||
|
||
|
||
def pytest_collection_modifyitems(items): | ||
""" | ||
Modify tests post collection. | ||
Here we override the default behavior of the `yul` fixture so that | ||
solc compiles with shanghai instead of cancun (which is unavailable | ||
in solc 0.8.20). | ||
""" | ||
for item in items: | ||
if "Cancun" in item.name and "yul" in item.fixturenames: | ||
warnings.warn("Compiling Yul source with Shanghai, not Cancun.") | ||
item.add_marker(pytest.mark.compile_yul_with("Shanghai")) |