jerry-git / jerry-git/pytest-split
`setup_class` time is not considered
- Dominant language
- Python
- Stars
- 325
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Considering a test case with `setup_class`:
```py
import time
class TestA:
@classmethod
def setup_class(cls):
time.sleep(6)
def test1(self):
time.sleep(2)
def test2(self):
time.sleep(3)
```
Run:
```sh
pytest test_a.py --store-durations
```
The result in `.test_durations`:
```
{
"test_a.py::TestA::test1": 8.008305040886626,
"test_a.py::TestA::test2": 3.003461800981313
}
```
Here, the `setup_class` time is counted in `test1`, but if `test1` and `test2` are split into different groups, `setup_class` in `test2` matters. To minimize the time, `pytest-split` should group them into the same group.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.