Skip to content

Commit

Permalink
Ensure tests run even if dask is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm committed Dec 29, 2023
1 parent 3de0911 commit 739cb75
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions papyri/tests/test_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,21 @@ def test_self_2():
g.collect_api_docs(
"papyri", {"papyri", "papyri.take2:RefInfo", "papyri.take2:RefInfo.__eq__"}
)
assert (
g.data["papyri"].to_dict()["arbitrary"][4]["children"][1]["children"][0]["dt"][
"children"
][0]["reference"]["module"]
== "dask"
)
try:
import dask
assert (
g.data["papyri"].to_dict()["arbitrary"][4]["children"][1]["children"][0]["dt"][
"children"
][0]["reference"]["module"]
== "dask"
)
except ImportError:
assert (
g.data["papyri"].to_dict()["arbitrary"][4]["children"][1]["children"][0]["dt"][
"children"
][0]["domain"]
is None
)

assert (
g.data["papyri.take2:RefInfo"]
Expand Down

0 comments on commit 739cb75

Please sign in to comment.