Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Nov 2, 2024
1 parent ca3681f commit 214d039
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scico/test/linop/test_convolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def testobj(request):
yield ConvolveTestObj()


def test_init(testobj):
with pytest.raises(ValueError):
A = Convolve(input_shape=(16, 16), h=testobj.psf_A)
with pytest.raises(ValueError):
A = Convolve(input_shape=(16,), h=testobj.psf_A, mode="invalid")
A = Convolve(input_shape=(16,), input_dtype=None, h=testobj.psf_A)
assert A.input_dtype == testobj.psf_A.dtype


@pytest.mark.parametrize("operator", [op.mul, op.truediv])
def test_scalar_left(testobj, operator):
A = operator(testobj.A, testobj.scalar)
Expand Down

0 comments on commit 214d039

Please sign in to comment.