Esempio n. 1
0
 def test_dump_read_dict_list_value_with_1_elm(self):
     sample = {'key': ['value1']}
     io.dump_dict_into_2_columns(sample, PATH_TO_FILE, val_type=list)
     result = io.read_dict_from_2_columns(PATH_TO_FILE, val_type=list)
     self.assertEqual(sample, result)
Esempio n. 2
0
 def test_dump_read_dict_with_space_delim(self):
     sample = {'key': 'value1'}
     io.dump_dict_into_2_columns(sample, PATH_TO_FILE, delim='|')
     result = io.read_dict_from_2_columns(PATH_TO_FILE, delim='|')
     self.assertEqual(sample, result)
Esempio n. 3
0
 def test_dump_read_dict_int_value(self):
     sample = {'key': 3}
     io.dump_dict_into_2_columns(sample, PATH_TO_FILE)
     result = io.read_dict_from_2_columns(PATH_TO_FILE)
     self.assertEqual(sample, result)