Skip to content

Question: is there a way to configure the output? #288

@SerGeRybakov

Description

@SerGeRybakov

Is there a way to configure the output? For example, these options are always very confusing for many people and for me personally:

@dataclasses.dataclass
class Theme:
    xfailed: Optional[str] = "green"
    xpassed: Optional[str] = "red"

Test file

import pytest

@pytest.mark.xfail(reason="Because the world is round...")
@pytest.mark.parametrize("num", [0, 1])
def test_example(num):
    assert 1 == num

Output

 tests/test_cases/test.py xX                                100% ██████████

Results (0.17s):
       1 xpassed
       1 xfailed

image

I'd prefer the failed tests to be marked with red, and passed with green.

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