[python-dtcwt] 159/497: add additional opencl filter tests
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:00 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.
commit e5f2091dcec56ee8ae5c1366dcefee91590d1907
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Fri Nov 8 10:46:18 2013 +0000
add additional opencl filter tests
---
tests/testopenclcoldfilt.py | 8 ++++++++
tests/testopenclcolifilt.py | 23 ++++++++++++++++++++---
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/tests/testopenclcoldfilt.py b/tests/testopenclcoldfilt.py
index 720925e..7ea7acf 100644
--- a/tests/testopenclcoldfilt.py
+++ b/tests/testopenclcoldfilt.py
@@ -68,4 +68,12 @@ def test_qshift():
z = coldfilt_gold(lena, h1b, h1a)
assert_almost_equal(y, z)
+ at skip_if_no_cl
+def test_qshift_even_input():
+ h1b = np.array((-0.25, 0.5, 0.5, -0.25))
+ h1a = h1b[::-1]
+ y = coldfilt(lena, h1b, h1a)
+ z = coldfilt_gold(lena, h1b, h1a)
+ assert_almost_equal(y, z)
+
# vim:sw=4:sts=4:et
diff --git a/tests/testopenclcolifilt.py b/tests/testopenclcolifilt.py
index 136e66d..55605c0 100644
--- a/tests/testopenclcolifilt.py
+++ b/tests/testopenclcolifilt.py
@@ -81,10 +81,27 @@ def test_qshift():
assert_almost_equal(y, z)
@skip_if_no_cl
-def test_qshift_odd_input():
+def test_qshift_odd_len_input_1():
h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b = qshift('qshift_d')
- y = colifilt(lena, h1b[:-2], h1b[:-2])
- z = colifilt_gold(lena, h1a[:-2], h1b[:-2])
+ h1a = h1a[:-2]
+ h1b = h1a[::-1]
+ y = colifilt(lena, h1a, h1b)
+ z = colifilt_gold(lena, h1a, h1b)
+ assert_almost_equal(y, z)
+
+ at skip_if_no_cl
+def test_qshift_odd_len_input_2():
+ h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b = qshift('qshift_d')
+ y = colifilt(lena, h1a[1:-1], h1b[1:-1])
+ z = colifilt_gold(lena, h1a[1:-1], h1b[1:-1])
+ assert_almost_equal(y, z)
+
+ at skip_if_no_cl
+def test_qshift_even_input():
+ h1b = np.array((-0.25, 0.5, 0.5, -0.25))
+ h1a = h1b[::-1]
+ y = colifilt(lena, h1b, h1a)
+ z = colifilt_gold(lena, h1b, h1a)
assert_almost_equal(y, z)
# vim:sw=4:sts=4:et
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git
More information about the debian-science-commits
mailing list