report.html

测试报告生成于 2022-06-14 13:10:49

环境变量

JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/
Packages {"pluggy": "1.0.0", "py": "1.11.0", "pytest": "7.1.2"}
Platform macOS-12.4-x86_64-i386-64bit
Plugins {"html": "3.1.2.dev20", "metadata": "2.0.1", "rerunfailures": "10.2"}
Python 3.9.12

概要

共4条用例 运行时间:0.05 秒。

1 通过 1 跳过 1 失败 1 出错 1 预期失败 1 非预期成功 0 重跑

测试结果

测试结果 测试用例 持续时间 链接
出错 test_a.py::test_a6::setup 0.00
@pytest.fixture
def a6():
> 1 / 0
E ZeroDivisionError: division by zero

test_a.py:32: ZeroDivisionError
失败 test_a.py::test_a2 0.00
def test_a2():
print('a2')
> assert 1 == 0
E assert 1 == 0

test_a.py:10: AssertionError
------------------------------Captured stdout call------------------------------
a2
预期失败 test_a.py::test_a4 0.00
@pytest.mark.xfail(reason="预期失败")
def test_a4():
print('a4')
> assert 1 > 2
E assert 1 > 2

test_a.py:21: AssertionError
------------------------------Captured stdout call------------------------------
a4
非预期通过 test_a.py::test_a5 0.00
------------------------------Captured stdout call------------------------------
a5
跳过 test_a.py::test_a3 0.00
('/Users/superhin/Projects/个人/pytest-html/test_a.py', 13, 'Skipped: 跳过')
通过 test_a.py::test_a1 0.00
------------------------------Captured stdout call------------------------------
a1