Is slash /
a reliable character to indicate a fixture union alternative test id in pytest-cases
#8157
Labels
topic: parametrize
related to @pytest.mark.parametrize
type: question
general question, might be closed after 2 weeks of inactivity
Dear pytest maintainers, in
pytest-cases
as you know I extend the "cross-product" parametrization engine of pytest so that it becomes a tree of independent cross-products, each path in the tree being a combination of fixture alternatives and having its own fixture closure. (see more detailed explanation here)I recently was challenged by users to simplify the generated test ids. I think that I found a reasonably elegant solution. It relies on a special character indicating that a given parameterset is a fixture alternative. For now I use special character
/
, as I find it intuitive to indicate that this goes into a sub-branch of the fixture closure tree.However I just noticed that this character is transformed by
pytest
into a backslash\
for display. Is this the only side-effect or is there any other I should know about ?Thanks a lot for your feedback !
The text was updated successfully, but these errors were encountered: