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

Pass exitstatus to pytest_terminal_summary hook #1809

Merged
merged 1 commit into from Aug 15, 2016

Conversation

Projects
None yet
3 participants
@blueyed
Contributor

blueyed commented Aug 14, 2016

This is useful to know if a testrun has been interrupted
(EXIT_INTERRUPTED).

  • Add a new entry to CHANGELOG.rst

blueyed added a commit to blueyed/pytest-notifier that referenced this pull request Aug 14, 2016

WIP: Handle interrupted test runs
This uses a instance to store the exitstatus from
`pytest_sessionfinish`, although that could probably just also be done on the
module?!

With `exitstatus` as an argument to the `pytest_terminal_summary` hook
it would be easier (pytest-dev/pytest#1809).

@blueyed blueyed referenced this pull request Aug 14, 2016

Closed

Handle interrupted test runs #3

@blueyed

This comment has been minimized.

Contributor

blueyed commented Aug 14, 2016

I came up with it for ratson/pytest-notifier#3.

But then I wonder if it could be just stored on the module level from the pytest_sessionfinish hook - instead of wrapping the plugin into a class instance?

Pass exitstatus to pytest_terminal_summary hook
This is useful to know if a testrun has been interrupted
(EXIT_INTERRUPTED).
@blueyed

This comment has been minimized.

Contributor

blueyed commented Aug 14, 2016

@coveralls

This comment has been minimized.

coveralls commented Aug 15, 2016

Coverage Status

Coverage remained the same at 93.103% when pulling 5b95ee3 on blueyed:exitstatus-with-pytest_terminal_summary into 99a4a1a on pytest-dev:features.

@nicoddemus nicoddemus merged commit d3b8551 into pytest-dev:features Aug 15, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Aug 15, 2016

Thanks @blueyed! 👍

@blueyed

This comment has been minimized.

Contributor

blueyed commented Aug 15, 2016

@nicoddemus
Any feedback on my questions? (especially if it's really necessary)
And the open TODO item about the changelog entry? (Shouldn't it be added there?)

@blueyed blueyed deleted the blueyed:exitstatus-with-pytest_terminal_summary branch Aug 15, 2016

nicoddemus added a commit that referenced this pull request Aug 15, 2016

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Aug 15, 2016

Any feedback on my questions? (especially if it's really necessary)

Sorry I missed them!

But then I wonder if it could be just stored on the module level from the pytest_sessionfinish hook - instead of wrapping the plugin into a class instance?

Not sure what do you mean here, care to elaborate?

And the open TODO item about the changelog entry? (Shouldn't it be added there?)

I did it myself in 4971525. 😁

@blueyed

This comment has been minimized.

Contributor

blueyed commented Aug 15, 2016

What I did in ratson/pytest-notifier#3 works already.
(And it might not be necessary to wrap it into a plugin instance)

So just getting the exitstatus in the pytest_sessionfinish hook, storing it on the module and then using it from there in the pytest_terminal_summary should work and might be even the way to go?!

@blueyed

This comment has been minimized.

Contributor

blueyed commented Aug 15, 2016

Anyway, I still think it's fine to have it a bit easier and since it's merged already: 🎆

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Aug 15, 2016

Anyway, I still think it's fine to have it a bit easier and since it's merged already

I agree! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment