Skip to content

Commit fd0db3c

Browse files
added test case for OpenpechaGitRepo opf_path
1 parent b2eb6eb commit fd0db3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/core/test_pecha.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,12 @@ def test_pecha_github_publish(tmp_path):
213213
pecha.publish()
214214

215215
print(pecha.pecha_path)
216+
217+
218+
def test_opf_path_OpenPechaGitRepo():
219+
from openpecha.core.pecha import OpenPechaGitRepo
220+
from openpecha import config
221+
pecha_id = "P000108"
222+
opf = OpenPechaGitRepo(pecha_id=pecha_id)
223+
expected_opf_path = config.PECHAS_PATH / pecha_id/ f"{pecha_id}.opf"
224+
assert opf.opf_path == expected_opf_path

0 commit comments

Comments
 (0)