I need to use the parameter --license
from run cli command to exclude the executing of some test cases.
I wanted to use mark.skipif
condition but how can there be called the value of --license
?
I tried next variant of mark.parametrized
but as I got it is not relevant for version pytest 7.4.4:
@mark.parametrize(
"language, id",
[
("en", 1),
param(
"fr", 2,
marks=mark.skipif(
pytest.config.getoption("--license"),
)
),
("qwer", 3),
],
)