Skip to content

Commit ef47d11

Browse files
committed
Skip kompilation cache test
1 parent 3701ddc commit ef47d11

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

kevm-pyk/src/tests/conftest.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import pytest
66
from pyk.cli.utils import dir_path
7+
import _pytest.skipping
78

89
if TYPE_CHECKING:
910
from pathlib import Path
@@ -34,6 +35,7 @@ def pytest_addoption(parser: Parser) -> None:
3435
type=dir_path,
3536
help='Use pre-kompiled definitions for proof tests',
3637
)
38+
parser.addoption("--no-skips", action="store_true", default=False, help="disable skip marks")
3739

3840

3941
@pytest.fixture
@@ -60,8 +62,16 @@ def kompiled_targets_dir(request: FixtureRequest, tmp_path_factory: TempPathFact
6062
return tmp_path_factory.mktemp('prekompiled')
6163

6264

63-
def pytest_configure(config):
64-
config.addinivalue_line(
65-
"markers",
66-
"haskell_backend_performance: special tests for use in HB performance scritps. Will not run elsewhere.",
67-
)
65+
@pytest.hookimpl(tryfirst=True)
66+
def pytest_load_initial_conftests(args):
67+
'''
68+
Allow ignoring the @pytest.mark.skip decorator and executing the 'skipped' test anyway.
69+
See https://stackoverflow.com/a/61503247.
70+
'''
71+
if "--no-skips" not in args:
72+
return
73+
74+
def no_skip(*args, **kwargs):
75+
return
76+
77+
_pytest.skipping.skip = no_skip

kevm-pyk/src/tests/integration/test_prove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _target_for_spec(spec_file: Path) -> Target:
184184
return Target(main_file, main_module_name)
185185

186186

187-
@pytest.mark.haskell_backend_performance
187+
@pytest.mark.skip
188188
@pytest.mark.parametrize(
189189
'spec_file',
190190
ALL_TESTS,

0 commit comments

Comments
 (0)