Closed mjuuti-tns closed 6 years ago
I like this idea, but I would call the keyword skipif
to match pytest's terminology.
Sure, I'll do changes tomorrow (it's midnight here). Just one verification: skipif=True-like object (or Callable which returns True-like object) would
I'd believe latter but just in case :)
That's a great question... I'm actually leaning towards the former, as in apply the marker if the condition is true.
I was consider following workflow:
lets say that in case skipif
is passed to marker, then it expects to get function which takes issue
argument as a parameter. in this case plugin calls passed function with appropriate issue as an argument, and depends on result the test-cases will be skipped (returned true) or executed (returned fasle).
Does it make sense, fit to your use-case ?
Merging #89 into master will increase coverage by
0.09%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #89 +/- ##
==========================================
+ Coverage 97.82% 97.91% +0.09%
==========================================
Files 1 1
Lines 184 192 +8
==========================================
+ Hits 180 188 +8
Misses 4 4
Impacted Files | Coverage Δ | |
---|---|---|
pytest_jira.py | 97.91% <100%> (+0.09%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update d60d3e9...80d435c. Read the comment docs.
Sure; my current use case only needs boolean, e.g. jira("ABC-1234", skipif=(Config.Value==Constant.Value)); Information which is available for python process but most likely is not in JIRA.
I added lambda handling but it came with some drawbacks:
I am giving some time to @liiight if he wants to share his opinion here, since he has expressed interest in this feature :-)
Looks great to me, thanks for considering me
@mjuuti-tns Thank you.
Add optional keyword argument 'condition' to jira markers to be able to disable marker if conditions are not met for example if Jira issue is specific only for one environment but does not affect others.