Skip to content

Commit

Permalink
update per yarik's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Nov 12, 2024
1 parent 3e258a4 commit aa080a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions dandi/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from enum import Enum
import os

from typing import Optional

#: A list of metadata fields which dandi extracts from .nwb files.
#: Additional fields (such as ``number_of_*``) might be added by
#: `get_metadata()`
Expand Down
9 changes: 5 additions & 4 deletions dandi/tests/test_dandiarchive.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,11 @@ def test_known_instances() -> None:
def test_parse_dandi_url_unknown_instance() -> None:
with pytest.raises(UnknownURLError) as excinfo:
parse_dandi_url("dandi://not-an-instance/000001")
assert str(excinfo.value) == (
"Unknown instance 'not-an-instance'. Valid instances: dandi,"
" dandi-api-local-docker-tests, dandi-staging, linc, linc-staging"
)

valid_instances = ", ".join(sorted(known_instances.keys()))
expected_message = f"Unknown instance 'not-an-instance'. Valid instances: {valid_instances}"

Check warning on line 444 in dandi/tests/test_dandiarchive.py

View check run for this annotation

Codecov / codecov/patch

dandi/tests/test_dandiarchive.py#L443-L444

Added lines #L443 - L444 were not covered by tests

assert str(excinfo.value) == expected_message

Check warning on line 446 in dandi/tests/test_dandiarchive.py

View check run for this annotation

Codecov / codecov/patch

dandi/tests/test_dandiarchive.py#L446

Added line #L446 was not covered by tests


@mark.skipif_no_network
Expand Down

0 comments on commit aa080a1

Please sign in to comment.