Skip to content

Commit 990fc82

Browse files
committed
Add change log entry
1 parent 7c602d4 commit 990fc82

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

changelog/7695.feature.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
A new hook was added, `pytest_markeval_namespace` which should return a dictionary.
2+
This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.
3+
4+
Psudo example
5+
6+
``conftest.py``:
7+
8+
.. code-block:: python
9+
10+
def pytest_markeval_namespace():
11+
return {"color": "red"}
12+
13+
``test_func.py``:
14+
15+
.. code-block:: python
16+
17+
@pytest.mark.skipif("color == 'blue'", reason="Color is not red")
18+
def test_func():
19+
assert False

0 commit comments

Comments
 (0)