Skip to content

Commit 7e861fa

Browse files
committed
🔬 more test coverage for jsonp
1 parent 8da3733 commit 7e861fa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/test_jsonr.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from nose.tools import eq_
2+
from nose.tools import eq_, raises
33
from pyexcel._compact import StringIO
44
from pyexcel_text.jsonp import JsonParser
55

@@ -9,6 +9,18 @@ class TestStructure:
99
def setUp(self):
1010
self.parser = JsonParser("json")
1111

12+
@raises(Exception)
13+
def test_wrong_format(self):
14+
sheet_name = 'test'
15+
self.content = self.parser.parse_file(get_file("unknown.json"),
16+
sheet_name=sheet_name)
17+
18+
@raises(Exception)
19+
def test_bad_dict(self):
20+
sheet_name = 'test'
21+
self.content = self.parser.parse_file(get_file("bad_dict.json"),
22+
sheet_name=sheet_name)
23+
1224
def test_dict(self):
1325
sheet_name = 'test'
1426
self.content = self.parser.parse_file(get_file("dict.json"),

0 commit comments

Comments
 (0)