Permalink
Browse files

Fix new test under python < 3.6

  • Loading branch information...
sickill committed Mar 4, 2018
1 parent 58cf009 commit 7fa2cdc62f772f5826ca05421d79420d8a7b612e
Showing with 7 additions and 6 deletions.
  1. +7 −6 tests/asciicast/v2_test.py
View
@@ -1,6 +1,7 @@
from ..test_helper import Test
import asciinema.asciicast.v2 as v2
import tempfile
import json
class TestWriter(Test):
@@ -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.

Show comment
Hide comment
@messenger123
@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.