import os import pytest from eorg.parser import parse from eorg.generate import html def test_basic(): with open(os.path.abspath("./tests/fixtures/test.org"), "r") as fp: doc = parse(fp) assert doc.title != '' assert doc.author != '' assert len(doc) == 20 def test_body(): with open(os.path.abspath("./tests/fixtures/test.org"), "r") as fp: doc = parse(fp) assert len([i for i in doc.body()]) > 0 def test_html_output(): with open(os.path.abspath("./tests/fixtures/test.org"), "r") as fp: doc = parse(fp) assert html(doc).read() == ''