Skip to content

Commit

Permalink
fixing tests for overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollman committed Dec 9, 2024
1 parent a0846fc commit 5a6988b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions caveclient/chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,13 @@ def is_valid_nodes(
-------
np.array of bool
Array of whether these are valid IDs.
Raises
-----
OverflowError
If the root_id are too large or negative to be represented as np.uint64.
"""

node_ids = root_id_int_list_check(node_ids, make_unique=False)

endpoint_mapping = self.default_url_mapping
Expand Down
4 changes: 2 additions & 2 deletions tests/test_chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,5 +1037,5 @@ def test_is_valid_nodes(self, myclient):
json=return_data,
match=[json_params_matcher(data)],
)
out = myclient.chunkedgraph.is_valid_nodes(query_nodes)
assert not np.any(out)
with pytest.raises(OverflowError):
out = myclient.chunkedgraph.is_valid_nodes(query_nodes)

0 comments on commit 5a6988b

Please sign in to comment.