pytest-dev / pytest-dev/pytest-html

Lines on both \r and \n

Open
#476 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
779
Forks
260
PR merge metrics
No merged PRs in 30d

Description

html report for log add lines for both \r and \n. This seems to be a bug.
Suppose we had a test:
def test_01_print():
print("one")
print("two\r\n", end="")
print("three\raaa")
print("four")
assert True

Terminal would show:
__________test_01_print ________
----- Captured stdout call -----
one
two
aaaee
four

However, report adds a line with \r
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported test output and compare the terminal result with the generated HTML report, focusing on how carriage returns and newlines are rendered. Done means the report does not add an extra line for \r and matches the shown terminal output for the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.