Skip to content

Commit

Permalink
tests: fix folder name and check against authors
Browse files Browse the repository at this point in the history
  • Loading branch information
kiike committed Mar 5, 2024
1 parent 15b9373 commit 6bac21c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ def test_simple(tmp_library: TemporaryLibrary) -> None:
assert len(folders) == 5
assert len(glob.glob(tmp_library.libdir + "/**/*.pdf")) == 4

doc = papis.document.from_folder(os.path.join(tmp_library.libdir, "IH8J2JJP"))
doc = papis.document.from_folder(
os.path.join(
tmp_library.libdir,
"95e29aafd24e14274ab8a1bb7887e2b7-svard-magnus-and-no"
)
)

info_name = os.path.join(os.path.dirname(__file__), "resources", "sql_out.yaml")
with open(info_name, encoding="utf-8") as fd:
data = yaml.load(fd, Loader=papis.yaml.Loader) # type: ignore[attr-defined]
expected_doc = papis.document.from_data(data)

assert expected_doc["ref"] == doc["ref"]
assert expected_doc["authors"] == doc["authors"]

# FIXME: currently fails on windows
# assert doc.get_files()

0 comments on commit 6bac21c

Please sign in to comment.