Draft very basic list parser.

This commit is contained in:
Sergio Martínez Portela 2021-02-10 00:21:37 +01:00
parent a2c5ad106f
commit fe454bd85e
3 changed files with 125 additions and 6 deletions

View file

@ -442,3 +442,20 @@ class TestSerde(unittest.TestCase):
self.assertEqual(
hl.deadline.time, Timestamp(True, 2020, 12, 17, None, None, None)
)
def test_mimic_write_file_06(self):
with open(os.path.join(DIR, "06-lists.org")) as f:
orig = f.read()
doc = loads(orig)
self.assertEqual(dumps(doc), orig)
def test_structure_file_06(self):
with open(os.path.join(DIR, "06-lists.org")) as f:
orig = f.read()
doc = loads(orig)
hl = doc.getTopHeadlines()[0]
# ...
lists = hl.getLists()
self.assertEqual(len(lists), 3)