Beispiel #1
0
 def test_to_iterable(self):
     d = formats.JSON(JSON_FILE)
     logging.debug(d.dict)
     data = d.to_iterable()
     first = data[0]
     text, label = first[0], first[1]
     assert_true(isinstance(text, unicode))
Beispiel #2
0
 def test_to_iterable(self):
     with open(JSON_FILE) as fp:
         d = formats.JSON(fp)
     data = d.to_iterable()
     first = data[0]
     text, label = first[0], first[1]
     assert_true(isinstance(text, unicode))
Beispiel #3
0
 def test_read_from_filename(self):
     formats.JSON(JSON_FILE)
Beispiel #4
0
 def test_read_from_file_object(self):
     with open(JSON_FILE) as fp:
         formats.JSON(fp)