Skip to content

Commit

Permalink
Fix test on Python 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Jul 9, 2019
1 parent 3ff90dd commit dc11f22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jupytext/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ def _multilines(obj):
try:
return obj.splitlines()
except AttributeError:
return json.dumps(obj, indent=True, sort_keys=True).splitlines()
# Remove the final blank space on Python 2.7
# return json.dumps(obj, indent=True, sort_keys=True).splitlines()
return [line.rstrip() for line in json.dumps(obj, indent=True, sort_keys=True).splitlines()]


def compare(actual, expected):
Expand Down

0 comments on commit dc11f22

Please sign in to comment.