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

Additionally handle logstart and logfinish hooks #3189

Merged
merged 3 commits into from Feb 7, 2018

Conversation

Projects
None yet
4 participants
@s0undt3ch
Contributor

s0undt3ch commented Feb 5, 2018

Thanks for submitting a PR, your contribution is really appreciated!

Here's a quick checklist that should be present in PRs:

  • Add a new news fragment into the changelog folder
    • name it $issue_id.$type for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of removal, feature, bugfix, vendor, doc or trivial
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."
  • Target: for bugfix, vendor, doc or trivial fixes, target master; for removals or features target features;
  • Make sure to include reasonable tests for your change if necessary

Unless your change is a trivial or a documentation fix (e.g., a typo or reword of a small section) please:

  • Add yourself to AUTHORS, in alphabetical order;

@s0undt3ch s0undt3ch referenced this pull request Feb 5, 2018

Closed

Fixes to live logs #3175

3 of 4 tasks complete
@coveralls

This comment has been minimized.

coveralls commented Feb 5, 2018

Coverage Status

Coverage increased (+0.006%) to 92.634% when pulling ea06c13 on s0undt3ch:feature/logstart-logfinish into f2fb841 on pytest-dev:features.

@nicoddemus

nicoddemus approved these changes Feb 5, 2018 edited

Great work @s0undt3ch, thanks!

@@ -371,18 +371,20 @@ def _runtest_for(self, item, when):
formatter=self.formatter, level=self.log_level) as log_handler:
if self.log_cli_handler:
self.log_cli_handler.set_when(when)

This comment has been minimized.

@thisch

thisch Feb 5, 2018

Contributor

I would add the following code here and remove your if item checks:

if item is None:
    yield
    return

This comment has been minimized.

@s0undt3ch

s0undt3ch Feb 5, 2018

Contributor

Good point.

@thisch

This comment has been minimized.

Contributor

thisch commented Feb 5, 2018

Thx for working on this!

@s0undt3ch

This comment has been minimized.

Contributor

s0undt3ch commented Feb 6, 2018

@nicoddemus sorry, I force pushed the changes asked by @thisch and lost your change log changes(forgot to pull first).

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Feb 6, 2018

I force pushed the changes asked by @thisch and lost your change log changes(forgot to pull first).

No worries, just pushed my change again. 👍

@s0undt3ch

This comment has been minimized.

Contributor

s0undt3ch commented Feb 6, 2018

Thanks!

if not hasattr(item, 'catch_log_handlers'):
item.catch_log_handlers = {}

This comment has been minimized.

@thisch

thisch Feb 6, 2018

Contributor

This newline and the next one are not really needed. Can you remove them please?

This comment has been minimized.

@s0undt3ch

s0undt3ch Feb 6, 2018

Contributor

Done

This comment has been minimized.

@thisch

thisch Feb 6, 2018

Contributor

Thx

s0undt3ch and others added some commits Jan 31, 2018

@thisch

thisch approved these changes Feb 6, 2018

@nicoddemus nicoddemus merged commit ed12cf3 into pytest-dev:features Feb 7, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment