forked from yt-project/yt_idv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add geometry checks for available shaders in GUI
- Loading branch information
1 parent
8e8936c
commit 6eb21f1
Showing
5 changed files
with
74 additions
and
21 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
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
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,23 @@ | ||
import pytest | ||
|
||
from yt_idv.shader_objects import component_shaders, get_shader_combos | ||
|
||
|
||
@pytest.mark.parametrize("render_name", component_shaders.keys()) | ||
def test_get_shader_combos_all_components(render_name): | ||
# default call to get_shader_combos should return all shaders | ||
expected = component_shaders[render_name] | ||
actual = get_shader_combos(render_name) | ||
assert set(expected) == set(actual) | ||
|
||
|
||
def test_get_shader_combos_coord(): | ||
# only block_rendering supports non-cartesian for now, check that the supported | ||
# shaders are returned as expected. | ||
shaders = get_shader_combos("block_rendering", coord_system="spherical") | ||
not_supported = ["isocontours", "slice"] | ||
assert all(s not in shaders for s in not_supported) | ||
supported = ["max_intensity", "projection", "transfer_function", "constant"] | ||
for s in supported: | ||
assert s in shaders | ||
assert all(s in shaders for s in supported) |