diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b50eeb5..78e0d4d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,8 @@ +1.0.5 (2018-11-20) +------------------ + +* `#15 `__: Remove some extra line separators from the diff output, which makes the representation more compact. + 1.0.4 (2018-10-18) ------------------ diff --git a/src/pytest_regressions/common.py b/src/pytest_regressions/common.py index 0f5bca7..fd0f983 100644 --- a/src/pytest_regressions/common.py +++ b/src/pytest_regressions/common.py @@ -35,7 +35,9 @@ def check_text_files(obtained_fn, expected_fn, fix_callback=lambda x: x, encodin expected_lines = expected_fn.read_text(encoding=encoding).splitlines() if obtained_lines != expected_lines: - diff_lines = list(difflib.unified_diff(expected_lines, obtained_lines)) + diff_lines = list( + difflib.unified_diff(expected_lines, obtained_lines, lineterm="") + ) if len(diff_lines) <= 500: html_fn = obtained_fn.with_suffix(".diff.html") try: