Description
When running this test with pytest-fluent
:
import pytest
@pytest.mark.simple
def test_simple():
"""
Simple test always passing
"""
assert True
I would like to be able to identify that simple
was used as a marker for test_simple
.
pytest-fluent
sends a testcase call message containing a markers
section.
However, it contains a mix of Python modules, actual markers, test methods in a
dictionary whose values are always 1:
{
"testId": "895ef55e-bad3-4a0d-b2f5-a55ce93d239c",
"sessionId": "ca6c7a99-df62-432d-a187-3ec774adef75",
"when": "call",
"stage": "testcase",
"markers": {
"pytest-fluent": 1,
"manual_tests/__init__.py": 1,
"test_simple.py": 1,
"pytestmark": 1,
"simple": 1,
"test_simple": 1
},
"duration": 0.0002015329991991166,
"outcome": "passed",
"name": "manual_tests/test_simple.py::test_simple"
}
I think at the moment markers
contains everything that could be matched against when using the pytest keyword parameter (-k
) - it probably has this pseudo-dictionary structure for fast read/write operations.
It would probably make sense to have under markers
the actual pytest markers (in the example above simple
) and remove all the rest. Alternatively, if we believe that the contained information is useful, I would propose to change its structure to a list, and call the property keywords
.