From 214d039b03ee1e8eee800f9a097d12bae7f52675 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Fri, 1 Nov 2024 19:22:54 -0600 Subject: [PATCH] Add some tests --- scico/test/linop/test_convolve.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scico/test/linop/test_convolve.py b/scico/test/linop/test_convolve.py index 31714a9a6..5eea9fd70 100644 --- a/scico/test/linop/test_convolve.py +++ b/scico/test/linop/test_convolve.py @@ -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)