pytest-sugar icon indicating copy to clipboard operation
pytest-sugar copied to clipboard

Question: is there a way to configure the output?

Open SerGeRybakov opened this issue 1 year ago • 0 comments

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.

SerGeRybakov avatar Nov 13 '24 08:11 SerGeRybakov