pytest-clarity reduces clarity of the diff if two similar strings only have \n at the end as the difference.
This is the normal pytest output (without any verbosity):
> assert 'Not enough operands\n' == 'Not enough operands'
E AssertionError: assert 'Not enough operands\n' == 'Not enough operands'
E - Not enough operands
E + Not enough operands
E ? +
That + at the end means that the first string has an LF at the end and the second one does not.
This is the pytest-clarity output (with triple vebosity):
> assert 'Not enough operands\n' == 'Not enough operands'
E assert == failed. [pytest-clarity diff shown]
E
E LHS vs RHS shown below
E
E Not enough operands
E
> assert 'Not enough operands' == 'Not enough operands\n'
E assert == failed. [pytest-clarity diff shown]
E
E LHS vs RHS shown below
E
E Not enough operands
E
pytest-clarity
reduces clarity of the diff if two similar strings only have\n
at the end as the difference.This is the normal
pytest
output (without any verbosity):That
+
at the end means that the first string has an LF at the end and the second one does not.This is the
pytest-clarity
output (with triple vebosity):