fixed tab to show repr

This commit is contained in:
Maddie Thai-Tang 2023-05-03 11:23:29 -04:00
parent 0b8c3de7a1
commit 042bc2dd2e
2 changed files with 4 additions and 4 deletions

View File

@ -291,8 +291,8 @@ def _diff_text(left: str, right: str, verbose: int = 0) -> List[str]:
]
for i in range(len(explanation)):
if "? " not in explanation[i]: # dont replace diff message tab
explanation[i] = explanation[i].replace("+ ", "+ \t")
explanation[i] = explanation[i].replace(" ", "\t")
explanation[i] = explanation[i].replace("+ ", "+ \\t")
explanation[i] = explanation[i].replace(" ", "\\t")
return explanation

View File

@ -274,8 +274,8 @@ TESTCASES = [
> assert result == desired
E AssertionError: assert 'spam bacon\\n eggs love' == 'spam bacon eggs love'
E - spam bacon eggs love
E + spam\tbacon
E + \teggs love
E + spam\\tbacon
E + \\teggs love
""",
id='Test "not in" string',
),