Skip to content

Commit 9fe0a64

Browse files
author
Laurent Guerard
committed
Add processing helper coverage
1 parent c76580d commit 9fe0a64

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/test_processing.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,25 @@ def test_filter_options():
3535
assert options == "radius=5 stack"
3636

3737

38+
def test_filter_options_gaussian_blur():
39+
"""Test `filter_options()` with the Gaussian Blur branch."""
40+
41+
command, options = filter_options("Gaussian Blur", 5)
42+
assert command == "Gaussian Blur..."
43+
assert options == "sigma="
44+
45+
3846
def test_threshold_options():
3947
"""Test `threshold_options()` string concatenation."""
4048

4149
auto_threshold, convert_to_binary = threshold_options("Otsu", do_3d=True)
4250
assert auto_threshold == "Otsu dark stack"
4351
assert convert_to_binary == "method=Otsu background=Dark black"
52+
53+
54+
def test_threshold_options_without_stack():
55+
"""Test `threshold_options()` when 3D stacking is disabled."""
56+
57+
auto_threshold, convert_to_binary = threshold_options("Otsu", do_3d=False)
58+
assert auto_threshold == ""
59+
assert convert_to_binary == "method=Otsu background=Dark black"

0 commit comments

Comments
 (0)