diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-02-18 11:51:51 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-02-18 11:51:51 +0200 |
commit | 0ed5b7355a75fc696cd33cff8eaab13637b97803 (patch) | |
tree | d8fc3606b7e6310759d16bad0c464c5612e055ee /subplot | |
parent | d72c1fa565cf1565f9c0e6e355ab4f4ad22ae0b5 (diff) | |
download | summain-rs-0ed5b7355a75fc696cd33cff8eaab13637b97803.tar.gz |
fix: drop unwanted empty lines from output
It turns out that something (serde_yaml) now outputs a newline at the
of a document. println! adds a second. Tests don't expect the extra
one so use print! instead.
Also, drop the temporary workaround.
Diffstat (limited to 'subplot')
-rw-r--r-- | subplot/summain.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/subplot/summain.py b/subplot/summain.py index 0a53b08..4bde65c 100644 --- a/subplot/summain.py +++ b/subplot/summain.py @@ -54,12 +54,6 @@ 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( |