-
Notifications
You must be signed in to change notification settings - Fork 7
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
8d91b7b
commit a8b7388
Showing
6 changed files
with
111 additions
and
46 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
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,14 @@ | ||
from dash_3d_viewer.utils import shape3d_to_size2d | ||
|
||
from pytest import raises | ||
|
||
|
||
def test_shape3d_to_size2d(): | ||
# shape -> z, y, x | ||
# size -> x, y, out-of-plane | ||
assert shape3d_to_size2d((12, 13, 14), 0) == (14, 13, 12) | ||
assert shape3d_to_size2d((12, 13, 14), 1) == (14, 12, 13) | ||
assert shape3d_to_size2d((12, 13, 14), 2) == (13, 12, 14) | ||
|
||
with raises(IndexError): | ||
shape3d_to_size2d((12, 13, 14), 3) |