File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11import os
2- from nose .tools import eq_
2+ from nose .tools import eq_ , raises
33from pyexcel ._compact import StringIO
44from 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" ),
You can’t perform that action at this time.
0 commit comments