Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test for is_valid_nodes #121

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/test_chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def package_timestamp(timestamp, name="timestamp"):


class TestChunkedgraph:

_default_endpoint_map = {
"cg_server_address": TEST_LOCAL_SERVER,
"table_id": test_info["segmentation_source"].split("/")[-1],
Expand Down Expand Up @@ -798,3 +797,13 @@ def test_get_info(self, myclient):

base_resolution = myclient.chunkedgraph.base_resolution
assert np.all(base_resolution == [8, 8, 40])

@responses.activate
def test_is_valid_nodes(self, myclient):
query_nodes = [91070075234304972, 91070075234296549]
out = myclient.chunkedgraph.is_valid_nodes(query_nodes)
assert np.all(out)

query_nodes = [0, -1]
out = myclient.chunkedgraph.is_valid_nodes(query_nodes)
assert not np.any(out)
Loading