Skip to content

Commit 817779a

Browse files
committed
Add tests for input checks
1 parent 65e1ec9 commit 817779a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/plantcv/test_readbayer.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,15 @@ def test_readbayer_default_bad_input():
2424
"""Test for PlantCV."""
2525
with pytest.raises(RuntimeError):
2626
_, _, _ = readbayer(filename="no-image.png", bayerpattern="GR", alg="default")
27+
28+
29+
def test_readbayer_bad_algorithm(test_data):
30+
"""Test for PlantCV."""
31+
with pytest.raises(ValueError):
32+
_, _, _ = readbayer(filename=test_data.bayer_img, bayerpattern="GR", alg="bad_algorithm")
33+
34+
35+
def test_readbayer_bad_bayerpattern(test_data):
36+
"""Test for PlantCV."""
37+
with pytest.raises(ValueError):
38+
_, _, _ = readbayer(filename=test_data.bayer_img, bayerpattern="bad_bayerpattern", alg="default")

0 commit comments

Comments
 (0)