-
- Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed as not planned
Description
There's a significant CPU overhead when processing the results of a skipped test, depending on stack size when you call pytest.skip
.
The following code takes 0.78s
for pytest 7.4.4 and 23.93s
for pytest 8.2.2
import pytest def get_data(): pytest.skip("Skipped") @pytest.fixture(scope="session") def data(): return get_data() @pytest.mark.parametrize("index", list(range(1000))) def test_do_nothing(data, index): assert index >= 0
pip list:
python -m pip list Package Version --------- ------- colorama 0.4.6 iniconfig 2.0.0 packaging 24.1 pip 24.0 pluggy 1.5.0 pytest 7.4.4
Environment for tests: Windows 11 with Python 3.13.0b2
Bug was originally identified on GHA Linux, Python 3.10, 3.11 and 3.12, then confirmed on Windows + Python 3.11.
Metadata
Metadata
Assignees
Labels
No labels