split node tests into standalone files

This commit is contained in:
2026-03-29 16:39:37 -07:00
parent 7983736c2e
commit c3bb34d248
53 changed files with 2625 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import numpy as np
def test_mask_invert():
from backend.nodes.mask_invert import MaskInvert
node = MaskInvert()
mask = np.zeros((64, 64), dtype=np.uint8)
mask[10:20, 10:20] = 255
inverted, = node.process(mask)
assert inverted.dtype == np.uint8
assert np.all(inverted[10:20, 10:20] == 0)
assert np.all(inverted[0:10, 0:10] == 255)
double, = node.process(inverted)
assert np.array_equal(double, mask)