Skip to content

test_warnings fails with Pytest 8.3 #135

@s-t-e-v-e-n-k

Description

@s-t-e-v-e-n-k

It seems like Pytest 8.3 has changed the coloring again, which means the percentage now prints as yellow for tests that warned, not green.

[    8s] _______________________________ test_warnings[] ________________________________
[    8s]
[    8s] compare = <function compare.<locals>.compare_fn at 0x7f5e7240e320>
[    8s]
[    8s]     def test_warnings(compare):
[    8s] >       compare(
[    8s]             'import warnings\n'
[    8s]             'def test():\n'
[    8s]             '    warnings.warn(UserWarning("WARNING!"))\n',
[    8s]         )
[    8s]
...
[    8s] E           </head><body><div class="highlight"><pre><span class=" -Color -Color-Bold">=============================</span> <span class=" -Color -Color-Bold">test</span> <span class=" -Color -Color-Bold">session</span> <span class=" -Color -Color-Bold">starts</span> <span class=" -Color -Color-Bold">==============================</span>
[    8s] E           platform linux -- Python 3.10.14, pytest-8.3.1, pluggy-1.5.0
[    8s] E           rootdir: /tmp/pytest-of-abuild/pytest-69/test_warnings0
[    8s] E           collected 1 item
[    8s] E
[    8s] E         - f.py <span class=" -Color -Color-Green">.</span>
                <span class=" -Color -Color-Green">[100%]</span>
[    8s] E         ?
                                            ^^ ^^
[    8s] E         + f.py <span class=" -Color -Color-Green">.</span>
                <span class=" -Color -Color-Yellow">[100%]</span>
[    8s] E         ?
                                            ^ ^^^^
[    8s] E

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions