Handle interrupted test runs#3
Closed
blueyed wants to merge 1 commit intoratson:masterfrom
Closed
Conversation
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).
1 task
Owner
|
@blueyed Is this still WIP? |
Collaborator
Author
|
@ratson 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
} |
Collaborator
Author
|
Please (squash-)merge it in case you like it.. :) |
Collaborator
Author
|
The patch is apparently for #4. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses a instance to store the exitstatus from
pytest_sessionfinish, although that could probably just also be done on themodule?!
With
exitstatusas an argument to thepytest_terminal_summaryhookit would be easier (pytest-dev/pytest#1809).