Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify gherkin terminal reporter to print tags #477

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

guillego
Copy link

@guillego guillego commented Jan 4, 2022

As mentioned in #476, this PR implements a simple parser for printing the tags in the verbose gherkin terminal reporter.

@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #477 (ef7681b) into master (2fb5a11) will increase coverage by 0.44%.
The diff coverage is 100.00%.

❗ Current head ef7681b differs from pull request most recent head 463bf19. Consider uploading reports for the commit 463bf19 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
+ Coverage   95.48%   95.93%   +0.44%     
==========================================
  Files          48       49       +1     
  Lines        1573     1648      +75     
  Branches      171      179       +8     
==========================================
+ Hits         1502     1581      +79     
+ Misses         44       41       -3     
+ Partials       27       26       -1     
Impacted Files Coverage Δ
pytest_bdd/gherkin_terminal_reporter.py 82.85% <100.00%> (+2.21%) ⬆️
pytest_bdd/types.py 100.00% <0.00%> (ø)
tests/feature/test_report.py 75.67% <0.00%> (ø)
tests/feature/test_outline.py 100.00% <0.00%> (ø)
tests/feature/test_outline_empty_values.py 100.00% <0.00%> (ø)
tests/args/test_arg_fixture_mix.py 100.00% <0.00%> (ø)
pytest_bdd/scenario.py 91.66% <0.00%> (+0.59%) ⬆️
pytest_bdd/parser.py 99.54% <0.00%> (+1.56%) ⬆️

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 2fb5a11...463bf19. Read the comment docs.

@guillego guillego marked this pull request as ready for review January 13, 2022 14:25
@guillego
Copy link
Author

@olegpidsadnyi This is my first time contributing, can you guide me through the PR process? Is there anything else I can do?

self._tw.write("Feature: ", **feature_markup)
self._tw.write(report.scenario["feature"]["name"], **feature_markup)
self._tw.write("\n")
self._tw.write(self._write_tags(prefix=" ", tags=report.scenario["tags"]), **tag_markup)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to use \tinstead of the space bar for a tabulation.

self._tw.write("Feature: ", **feature_markup)
self._tw.write(report.scenario["feature"]["name"], **feature_markup)
self._tw.write("\n")
self._tw.write(self._write_tags(prefix=" ", tags=report.scenario["tags"]), **tag_markup)
self._tw.write("\n")
self._tw.write(" Scenario: ", **scenario_markup)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@youtux
Copy link
Contributor

youtux commented Jul 24, 2022

Hi @guillego, this looks like something we would like to merge, but it would needs some tests to be added to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants