Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SerGeRybakov opened this issue Nov 13, 2024 · 0 comments
Open

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

SerGeRybakov opened this issue Nov 13, 2024 · 0 comments

Comments

@SerGeRybakov
Copy link

SerGeRybakov commented Nov 13, 2024

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.

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

No branches or pull requests

1 participant