Skip to content

Commit e4d8896

Browse files
committed
🔬 more test coverage for json renderer and text renderer
1 parent 12b9155 commit e4d8896

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_misc.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from nose.tools import eq_
2+
import pyexcel as p
3+
from textwrap import dedent
4+
5+
6+
def test_sheet_stream():
7+
test_data = [[1, 2]]
8+
stream = p.isave_as(array=test_data, dest_file_type='rst')
9+
expected = dedent("""
10+
pyexcel_sheet1:
11+
= =
12+
1 2
13+
= =""").strip('\n')
14+
eq_(stream.getvalue(), expected)
15+
16+
17+
def test_simple_sheet():
18+
sheet = p.Sheet([[1, 2]])
19+
eq_(sheet.json, '{"pyexcel sheet": [[1, 2]]}')

0 commit comments

Comments
 (0)