-
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.
added datasets with out black or white and warn
- Loading branch information
Showing
6 changed files
with
89 additions
and
20 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 |
---|---|---|
@@ -1,7 +1,25 @@ | ||
from specarray import SpecArray | ||
from pathlib import Path | ||
|
||
from pytest_check import check | ||
import pytest | ||
|
||
|
||
def test_from_dir(testdata_specim: SpecArray): | ||
check.equal(testdata_specim.shape, (2, 1024, 448)) | ||
|
||
|
||
def test_no_black(testdata_no_black: Path): | ||
with pytest.warns(UserWarning): | ||
no_black = SpecArray.from_folder(testdata_no_black) | ||
check.is_instance(no_black, SpecArray) | ||
check.equal(no_black.shape, (2, 1024, 448)) | ||
check.equal(no_black.black.shape, ()) | ||
|
||
|
||
def test_no_white(testdata_no_white: Path): | ||
with pytest.warns(UserWarning): | ||
no_white = SpecArray.from_folder(testdata_no_white) | ||
check.is_instance(no_white, SpecArray) | ||
check.equal(no_white.shape, (2, 1024, 448)) | ||
check.equal(no_white.white.shape, ()) |