Skip to content

Handle interrupted test runs#3

Closed
blueyed wants to merge 1 commit intoratson:masterfrom
blueyed:handle-interrupted
Closed

Handle interrupted test runs#3
blueyed wants to merge 1 commit intoratson:masterfrom
blueyed:handle-interrupted

Conversation

@blueyed
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

blueyed commented Oct 7, 2016

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

@blueyed
Copy link
Copy Markdown
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