Is it possible to hide specific parametrize markers ids? #8334
-
I am writing optional finalizer which has to be executed late and I figure out that I can decide if its run via mark.parametrize with indirect, but I don't want to see my bool as id of test case as this will look dirty. @pytest.fixture(autouse=True)
my_logcatcher():
catch_logs()
if something is True:
parse_logs()
@pytest.mark.parametrize("my_logcatcher", [True], indirect=True, scope="function")
test_something_X():
pass
test_something_Y():
pass I would like to skip addition of that True to test case name. On the other side maybe there is a cleaner way to do what I want. |
Beta Was this translation helpful? Give feedback.
Answered by
RonnyPfannschmidt
Feb 10, 2021
Replies: 1 comment 1 reply
-
Just use a different mark and check for the mark in the fixture |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
panjacek
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just use a different mark and check for the mark in the fixture