16 lines
444 B
Python
16 lines
444 B
Python
import os
|
|
import pytest
|
|
from eorg.parser import parse
|
|
|
|
|
|
def test_fetch_attribute():
|
|
with open(os.path.abspath("./tests/fixtures/test.org"), "r") as fp:
|
|
doc = parse(fp)
|
|
assert doc.title.value == ' Emacs org-mode examples'
|
|
|
|
def test_fetch_non_existant_attribute():
|
|
with open(os.path.abspath("./tests/fixtures/test.org"), "r") as fp:
|
|
doc = parse(fp)
|
|
with pytest.raises(ValueError):
|
|
doc.fake
|