반응형 pytest-html1 [Python] PyTest-html pytest를 사용하면 테스트 결과 리포트 html 을 출력할 수 있다.pip install pytest-html 테스트 파일 # test_ex1.pyimport pytestdef func(x): return x + 1def test_answer(): assert func(3) == 5 pytest test_ex1.py --html=report.html 위 명령을 실행하면 현재 디렉토리에 report.html 파일이 생성되며, 이 파일은 테스트 실행 결과를 포함한 시각적인 HTML 리포트를 제공한다. 참고https://pytest-html.readthedocs.io/en/latest/installing.html=3.6 or PyPy3." data-og-title="Installation .. 2024. 5. 1. 이전 1 다음 반응형