pytest-dev / pytest-dev/pytest
--durations=0 reports each test twice
Open
Nobody has claimed this yet.
status: help wanted
topic: reporting
type: bug
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
- a detailed description of the bug or problem you are having
with --durations=0 I get each test listed twice
======================================================================================================================================== slowest durations ========================================================================================================================================
150.30s call tests/test_10_scim_delete.py::TestClass::test01_prereg_delete_users[test12]
21.23s call tests/test_03_scim_insert.py::TestClass::test01_prereg_users[test12]
3.03s call tests/test_01_services.py::TestClass::test01_services_up[test12]
3.02s call tests/test_01_services.py::TestClass::test01_services_up[test12]
2.90s call tests/test_11_dsfmock_delete.py::TestClass::test02_delete_dsfmock[test12]
2.90s call tests/test_11_dsfmock_delete.py::TestClass::test02_delete_dsfmock[test12]
2.63s call tests/test_02_dsfmock_insert.py::TestClass::test02_insert_dsfmock[test12]
2.63s call tests/test_02_dsfmock_insert.py::TestClass::test02_insert_dsfmock[test12]
0.38s call tests/test_03_scim_insert.py::TestClass::test01_prereg_users_from_file
0.38s call tests/test_03_scim_insert.py::TestClass::test01_prereg_users_from_file
0.32s call tests/test_10_scim_delete.py::TestClass::test01_prereg_users_from_file
0.32s call tests/test_10_scim_delete.py::TestClass::test01_prereg_users_from_file
0.02s call tests/test_02_dsfmock_insert.py::TestClass::test01_gen_users
0.02s call tests/test_02_dsfmock_insert.py::TestClass::test01_gen_users
0.01s call tests/test_11_dsfmock_delete.py::TestClass::test01_prereg_users_from_file
0.01s call tests/test_11_dsfmock_delete.py::TestClass::test01_prereg_users_from_file
- output of
pip listfrom the virtual environment you are using
pip freeze -l
astroid==2.4.2
atomicwrites==1.4.0
attrs==20.3.0
certifi==2020.11.8
cffi==1.14.3
chardet==3.0.4
colorama==0.4.4
cryptography==3.2.1
idna==2.10
iniconfig==1.1.1
isort==5.6.4
lazy-object-proxy==1.4.3
mccabe==0.6.1
packaging==20.4
pep8==1.7.1
pluggy==0.13.1
py==1.9.0
pycparser==2.20
PyJWT==1.7.1
pylint==2.6.0
pyparsing==2.4.7
pytest==6.1.2
pytest-html==3.0.0
pytest-metadata==1.10.0
requests==2.24.0
six==1.15.0
toml==0.10.2
urllib3==1.25.11
wrapt==1.12.1
- pytest and operating system versions
python.exe -c 'import pytest;print(pytest.__version__)'
6.1.2
Get-ComputerInfo | select OSName, OSVersion, windowsversion
OsName OsVersion WindowsVersion
------ --------- --------------
Microsoft Windows 10 Enterprise 10.0.19042 2009
python.exe --version
Python 3.9.0
- minimal example if possible
Test runs in containers on linux ubuntu 16.06LTS and they all show fine there. But not in windows.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce pytest with --durations=0 using a parametrized test on Windows and compare the duration report with the Linux behavior described here. Trace the duration-reporting entry point, then add regression coverage showing that each test appears only once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100