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))
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))
def test_read_from_filename(self): formats.JSON(JSON_FILE)
def test_read_from_file_object(self): with open(JSON_FILE) as fp: formats.JSON(fp)