diff --git a/tests/conftest.py b/tests/conftest.py index de80ed2829..25a7ef24ca 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,12 @@ """ -Pytest (plugin) definitions local to Cancun tests. +Pytest definitions applied to all tests. """ import warnings import pytest -def pytest_collection_modifyitems(items): +def pytest_collection_modifyitems(items, config): """ Modify tests post collection. @@ -16,5 +16,8 @@ def pytest_collection_modifyitems(items): """ for item in items: if "Cancun" in item.name and "yul" in item.fixturenames: - warnings.warn("Compiling Yul source with Shanghai, not Cancun.") + if config.getoption("verbose") >= 2: + warnings.warn(f"Compiling Yul source for f{item.name} with Shanghai, not Cancun.") + else: + warnings.warn("Compiling Yul source with Shanghai, not Cancun.") item.add_marker(pytest.mark.compile_yul_with("Shanghai"))