From e446cb15771202899c30918ad50aff5e6cd5f88f Mon Sep 17 00:00:00 2001 From: John Evans Date: Thu, 20 Nov 2014 10:32:43 -0500 Subject: [PATCH] filter out max rlevel test on version 1.x of openjpeg, closes #301 there's nothing that can be done about it, it's behavior in the library --- glymur/test/test_jp2k.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/glymur/test/test_jp2k.py b/glymur/test/test_jp2k.py index 8eaf82a..99e655f 100644 --- a/glymur/test/test_jp2k.py +++ b/glymur/test/test_jp2k.py @@ -226,8 +226,16 @@ class TestSliceProtocolRead(SliceProtocolBase): expected = self.j2k_data[3:8, :,:] np.testing.assert_array_equal(actual, expected) - @unittest.skip('see issue 301') + @unittest.skipIf(re.match("0|1", glymur.version.openjpeg_version), + "Must have openjpeg 2 or higher to run") def test_region_rlevel5(self): + """ + maximim rlevel + + There seems to be a difference between version of openjpeg, as + openjp2 produces an image of size (16, 13, 3) and openjpeg produced + (17, 12, 3). + """ actual = self.j2k[5:533:32, 27:423:32] expected = self.j2k_data_r5[1:17, 1:14] np.testing.assert_array_equal(actual, expected)