Skip to content
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
4 changes: 3 additions & 1 deletion src/pyeval/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,6 @@ def runtest(self):
def reportinfo(self):
parent_name = f"{self.parent.name}:" if self.parent is not None else ""

return self.fspath, None, f"{parent_name}{self.name}"
# 0 is the pytest convention for synthetic items with no source line —
# see https://docs.pytest.org/en/stable/example/nonpython.html
return self.fspath, 0, f"{parent_name}{self.name}"
17 changes: 17 additions & 0 deletions tests/evals/eval_skipif.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Regression test: pytestmark skipif must not cause INTERNALERROR."""

import pytest

from pyeval import Case, dataset, execute

pytestmark = pytest.mark.skipif(
True,
reason="always skipped — tests that EvalItem handles pytestmark skipif without INTERNALERROR",
)


@dataset(
Case(name="skipped_case", inputs="hello", expected_output="hello"),
)
def eval_skipif_regression(case):
execute(lambda x: x, case)