(self)
| 20 | shutil.rmtree(self.tmp_dir) |
| 21 | |
| 22 | def test_jsonl(self): |
| 23 | fpath = os.path.join(self.tmp_dir, '1.jsonl') |
| 24 | obj_list = [{'aaa': 'bbb'}, 111, [1.1]] |
| 25 | write_to_jsonl(fpath, obj_list) |
| 26 | new_obj = {'bbb': 'aaa'} |
| 27 | obj_list.append(new_obj) |
| 28 | append_to_jsonl(fpath, new_obj) |
| 29 | new_obj_list = read_from_jsonl(fpath) |
| 30 | self.assertTrue(new_obj_list == obj_list) |
| 31 | |
| 32 | def test_jsonl2(self): |
| 33 | fpath = os.path.join(self.tmp_dir, '1.jsonl') |
nothing calls this directly
no test coverage detected