Skip to content

Handle interrupted test runs #3

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

Closed
wants to merge 1 commit into from

Conversation

blueyed
Copy link
Collaborator

@blueyed blueyed commented Aug 14, 2016

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).

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).
@ratson
Copy link
Owner

ratson commented Oct 7, 2016

@blueyed Is this still WIP?

@blueyed blueyed changed the title WIP: Handle interrupted test runs Handle interrupted test runs Oct 7, 2016
@blueyed
Copy link
Collaborator Author

blueyed commented Oct 7, 2016

@ratson
No, I am using this since then, with another patch on top, but it might be unrelated / another issue:

diff --git i/pytest_notifier/__init__.py w/pytest_notifier/__init__.py
index 00e92dc..3c42e07 100644
--- i/pytest_notifier/__init__.py
+++ w/pytest_notifier/__init__.py
@@ -70,7 +70,7 @@ def pytest_terminal_summary(self, terminalreporter):
         duration = time() - tr._sessionstarttime
         keys = ('passed', 'failed', 'error', 'deselected')
         counts = {
-            k: len(list(filter(lambda r: getattr(r, 'when', '') == 'call', tr.stats.get(k, []))))
+            k: len(tr.stats.get(k, []))
             for k in keys
         }

@blueyed
Copy link
Collaborator Author

blueyed commented Oct 7, 2016

Please (squash-)merge it in case you like it.. :)

@blueyed
Copy link
Collaborator Author

blueyed commented Oct 7, 2016

The patch is apparently for #4.

@ratson ratson closed this Mar 31, 2017
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.

2 participants