Skip to content

Commit

Permalink
Add changelog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Aug 30, 2020
1 parent 8a3db02 commit 0a7e893
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions changelog/7695.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
A new hook was added, `pytest_markeval_namespace` which should return a dictionary.
This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.

Psudo example

``conftest.py``:

.. code-block:: python
def pytest_markeval_namespace():
return {"color": "red"}
``test_func.py``:

.. code-block:: python
@pytest.mark.skipif("color == 'blue'", reason="Color is not red")
def test_func():
assert False

0 comments on commit 0a7e893

Please sign in to comment.