pytest-bdd
pytest-bdd copied to clipboard
Fix gherkin terminal report colouring
Add a extra hook to mark steps as skipped, which will allow to distinguish if a step is skipped or not and therefor the output colouring could be done properly.
This PR closes #214 #299 #248
Codecov Report
Patch coverage: 100.00% and project coverage change: +0.06 :tada:
Comparison is base (
d45c543) 95.40% compared to head (4533677) 95.47%.
Additional details and impacted files
@@ Coverage Diff @@
## master #372 +/- ##
==========================================
+ Coverage 95.40% 95.47% +0.06%
==========================================
Files 49 49
Lines 1764 1789 +25
Branches 193 196 +3
==========================================
+ Hits 1683 1708 +25
Misses 53 53
Partials 28 28
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/pytest_bdd/gherkin_terminal_reporter.py | 81.81% <100.00%> (+0.27%) |
:arrow_up: |
| src/pytest_bdd/hooks.py | 100.00% <100.00%> (ø) |
|
| src/pytest_bdd/parser.py | 98.64% <100.00%> (+0.01%) |
:arrow_up: |
| src/pytest_bdd/plugin.py | 98.21% <100.00%> (+0.10%) |
:arrow_up: |
| src/pytest_bdd/reporting.py | 90.76% <100.00%> (+1.88%) |
:arrow_up: |
| src/pytest_bdd/scenario.py | 93.15% <100.00%> (+0.14%) |
:arrow_up: |
| tests/feature/test_report.py | 77.50% <100.00%> (+1.82%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
any update on this, please.
Merge, please?
@hristiy4n Could you rebase your code and submit it again ? I'd love to have this feature.
I rebased the MR, lets hope it gets merged this time.
@youtux Could you please review this ? I'd like to avoid it to fall back into oblivion.
@hristiy4n Could you ask for another reviewer ?
@hristiy4n ?
@hristiy4n Could you ask for another reviewer ?
I re-requested the review from @olegpidsadnyi. I do not think I have the permissions to request a review from someone else.
@olegpidsadnyi @youtux Sorry for the brute forcing, but could you please review this please ?
@olegpidsadnyi @youtux Sorry for the brute forcing, but could you please review this please ?
I looked into the cucumber spec, I don't see any magic tag that skips the scenario from the scenario definition itself. So the cucumber is deselecting them from the command line by negating the tags. It could be any tag. Pytest has similar CLI where you can pass the tags and we could utilize the pytest collection mechanism and hooks. Is this PR introducing some magic tag? Do we delegate the skipping to the scenario execution itself instead of the pytest collection and run mechanism? How is it in line with pytest and with the cucumber?
@hristiy4n ?
@hristiy4n ?