You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is slash / a reliable character to indicate a fixture union alternative test id in pytest-cases #8157
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 @RonnyPfannschmidt . Ok, then I'll release version 2.8.0 with this character, and if this becomes a forbidden character let me know! Of course if the display can be fixed in the future that can be even better, but this is non-blocking for me. The only side-effet of current behaviour for users of pytest-harvest or similar plugin is that they see / in the list of collected the test results, but see \ in the console display and IDE (PyCharm, etc.). Not a big deal I guess.
Activity
RonnyPfannschmidt commentedon Dec 16, 2020
Off hand I'd think it's just path display bug, i intend to turn test ids into a more complex object soonish
smarie commentedon Dec 16, 2020
Thanks @RonnyPfannschmidt . Ok, then I'll release version 2.8.0 with this character, and if this becomes a forbidden character let me know! Of course if the display can be fixed in the future that can be even better, but this is non-blocking for me. The only side-effet of current behaviour for users of
pytest-harvestor similar plugin is that they see/in the list of collected the test results, but see\in the console display and IDE (PyCharm, etc.). Not a big deal I guess.Zac-HD commentedon Nov 29, 2021
Closing as answered 👍