summaryrefslogtreecommitdiff
path: root/subplot/summain.py
diff options
context:
space:
mode:
Diffstat (limited to 'subplot/summain.py')
-rw-r--r--subplot/summain.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/subplot/summain.py b/subplot/summain.py
index d01e441..0a53b08 100644
--- a/subplot/summain.py
+++ b/subplot/summain.py
@@ -53,6 +53,13 @@ def output_matches_file(ctx, filename=None):
actual = runcmd_get_stdout(ctx)
expected = get_file(filename).decode("UTF-8")
+
+ # For some reason, in CI actual has an extra newline at the end. I have
+ # failed to find why. As a workaround, stripping it here.
+ if actual.endswith("\n\n"):
+ print("FIXME: stripping extra newline from actual output")
+ actual = actual[:-1]
+
diff = "".join(
line.rstrip("\n") + "\n"
for line in difflib.unified_diff(