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

test_warnings fails with Pytest 8.3

Open s-t-e-v-e-n-k opened this issue 1 year ago • 0 comments

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

s-t-e-v-e-n-k avatar Jul 29 '24 04:07 s-t-e-v-e-n-k