-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
657b28b
commit 48c54ac
Showing
3 changed files
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from yt_napari._widget_matadata import LayersList, MetadataWidget | ||
|
||
|
||
def test_widget_reader(make_napari_viewer): | ||
viewer = make_napari_viewer() | ||
r = MetadataWidget(napari_viewer=viewer) | ||
r.metadata_input_container.filename.value = "_ytnapari_load_grid" | ||
r.inspect_file() | ||
r.inspect_file() # do it again to hit that clear statement | ||
|
||
assert "stream" in r.field_lists.keys() | ||
|
||
r.field_lists["stream"].expand() | ||
r.field_lists["stream"].expand() | ||
|
||
assert "domain_left_edge" in r.array_vals.keys() | ||
r.array_vals["domain_left_edge"].update_units("km") | ||
r.deleteLater() | ||
|
||
|
||
def test_layer_list(): | ||
ll = LayersList("test_layer", range(0, 10), expand=False) | ||
ll.expand() | ||
assert ll.currently_expanded is True | ||
ll.deleteLater() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters