pytest-dev / pytest-dev/pytest-html
Type mis match error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 779
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
I am using pytest-html for report generation. The version is 4.1.1, however I get below error.
"/home/sqm/2060-3/sqm/test/regression/src/sqm_tests/.tox/py38/lib/python3.8/site-packages/pytest_html/report_data.py", line 140, in add_test
INTERNALERROR> test_data["log"] = _handle_ansi("\n".join(logs))
INTERNALERROR> TypeError: sequence item 0: expected str instance, div found
Typecasting "logs" to string, resolves the error and I can generate the report.
Let me know if I need to use pytest-html in different way or this is probable fix for future release.
I am using python3.8.10 for test
Contributor guide
No contributing guide indexed for this repository
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
Start in pytest_html/report_data.py at add_test around line 140 and inspect how logs containing a div are joined under pytest-html 4.1.1 on Python 3.8.10. Reproduce the reported TypeError and verify that report generation succeeds without requiring the caller to typecast logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100