Skip to content

Commit 190b857

Browse files
committed
test sortable
1 parent c2a81c2 commit 190b857

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.moban.d/README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ Here's what you will get:
1717
.. image:: https://github.com/pyexcel/pyexcel-sortable/raw/master/sortable.gif
1818

1919
{%endblock%}
20+
21+
{%block documentation_link%}
22+
{%endblock %}

README.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ pyexcel-sortable - Let you focus on data, instead of file formats
1414
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
1515
:target: https://gitter.im/pyexcel/Lobby
1616

17-
.. image:: https://readthedocs.org/projects/pyexcel-sortable/badge/?version=latest
18-
:target: http://pyexcel-sortable.readthedocs.org/en/latest/
1917

2018

2119
**pyexcel-sortable** is inspired by `csvtotable <https://github.com/vividvilla/csvtotable>`_ and

tests/test_sortable.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import uuid
2+
3+
import pyexcel as p
4+
from nose.tools import raises
5+
6+
from pyexcel_sortable.sortable import Sortable
7+
8+
9+
def test_render_sheet():
10+
test_header = uuid.uuid4().hex
11+
sheet = p.Sheet([[test_header], [1]])
12+
sortable = Sortable('sortable.html')
13+
stream = sortable.get_io()
14+
sortable.set_output_stream(stream)
15+
sortable.render_sheet(sheet)
16+
assert test_header in stream.getvalue()
17+
18+
19+
@raises(Exception)
20+
def test_render_book():
21+
sortable = Sortable('sortable.html')
22+
sortable.render_book("not supported yet")

0 commit comments

Comments
 (0)