We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c7d015 commit bf3dcceCopy full SHA for bf3dcce
changelog/7695.feature.rst
@@ -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
16
17
+ @pytest.mark.skipif("color == 'blue'", reason="Color is not red")
18
+ def test_func():
19
+ assert False
0 commit comments