Skip to content

Ignores errors during setup #4

@blueyed

Description

@blueyed

The following code is used to get the counts, but it filters out "error" entries with when='setup' (and outcome='failed'):

keys = ('passed', 'failed', 'error', 'deselected')
counts = {
    k: len(list(filter(lambda r: getattr(r, 'when', '') == 'call', tr.stats.get(k, []))))
    for k in keys
}

This can happen with a "fixture 'foo' not found" error, and pytest-notifier would report a "Success", although the real outcome is "2 passed, X deselected, 25 error".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions