hello,
while playing with new subtests feature in pytest 9.0, I found that sometimes the test is reported twice for some reason. could you check why is that?
thanks.
regards,
jaroslav
# pytest.ini
[pytest]
minversion = 9.0
; pytest-timeout: the test should be really short
timeout = 60
; pytest-html
generate_report_on_test = True
; test discovery
norecursedirs = _*
python_files = *.py
python_functions = *_test
;
addopts =
-ra
-s
--junit-xml=report.xml
--self-contained-html
--html=report.html
--ctrf=report.json
# my_test.py
from random import randint
from pytest import Subtests
def feat_test(subtests: Subtests):
for i in range(10):
with subtests.test(i):
assert randint(0, 10) == i
report.html