improve back and frontend testing

This commit is contained in:
2026-03-29 19:58:06 -07:00
parent 29eee8a42c
commit e9215a64ff
70 changed files with 13441 additions and 134 deletions

View File

@@ -34,3 +34,14 @@ def test_threshold_mask():
assert mask_otsu[:, 32:].sum() > mask_otsu[:, :32].sum()
ThresholdMask._broadcast_fn = None
def test_threshold_mask_unknown_method():
from backend.nodes.mask_threshold import ThresholdMask
node = ThresholdMask()
field = make_field(data=np.zeros((16, 16)))
try:
node.process(field, method="invalid", threshold=0.5, direction="above")
assert False, "Expected ValueError"
except ValueError:
pass