Пример #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))
Пример #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))
Пример #3
0
 def test_read_from_filename(self):
     formats.JSON(JSON_FILE)
Пример #4
0
 def test_read_from_file_object(self):
     with open(JSON_FILE) as fp:
         formats.JSON(fp)