Skip to content

Commit

Permalink
Fix new test under python < 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Mar 4, 2018
1 parent 58cf009 commit 7fa2cdc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/asciicast/v2_test.py
@@ -1,6 +1,7 @@
from ..test_helper import Test
import asciinema.asciicast.v2 as v2
import tempfile
import json


class TestWriter(Test):
Expand All @@ -15,9 +16,9 @@ def test_writing(self):
w.write_stdout(4, bytes.fromhex('78 78'))

with open(path, 'r') as f:
text = f.read()
assert text == '{"version": 2, "width": 80, "height": 24}\n' + \
'[1, "o", "x"]\n' + \
'[2, "o", "x偶贸"]\n' + \
'[3, "o", "艂膰"]\n' + \
'[4, "o", "xx"]\n', 'got:\n\n%s' % text
lines = list(map(json.loads, f.read().strip().split('\n')))

This comment has been minimized.

Copy link
@messenger123
assert lines == [{"version": 2, "width": 80, "height": 24},
[1, "o", "x"],
[2, "o", "x偶贸"],
[3, "o", "艂膰"],
[4, "o", "xx"]], 'got:\n\n%s' % lines

0 comments on commit 7fa2cdc

Please sign in to comment.