filter out write tests that should not run on openjpeg 1.3

This commit is contained in:
John Evans 2014-11-18 09:48:19 -05:00
commit 036b14cc2b
3 changed files with 8 additions and 0 deletions

View file

@ -54,6 +54,8 @@ class TestDataEntryURL(unittest.TestCase):
def setUp(self):
self.jp2file = glymur.data.nemo()
@unittest.skipIf(re.match("1.5|2", glymur.version.openjpeg_version) is None,
"Must have openjpeg 1.5 or higher to run")
def test_wrap_greyscale(self):
"""A single component should be wrapped as GREYSCALE."""
j = Jp2k(self.jp2file)

View file

@ -76,6 +76,8 @@ class SliceProtocolBase(unittest.TestCase):
self.j2k_data_r1 = self.j2k[::2, ::2]
self.j2k_data_r5 = self.j2k[::32, ::32]
@unittest.skipIf(re.match("1.5|2", glymur.version.openjpeg_version) is None,
"Must have openjpeg 1.5 or higher to run")
@unittest.skipIf(os.name == "nt", fixtures.WINDOWS_TMP_FILE_MSG)
class TestSliceProtocolBaseWrite(SliceProtocolBase):
@ -524,6 +526,8 @@ class TestJp2k(unittest.TestCase):
jpx = Jp2k(self.jpxfile)
self.assertEqual(jpx.shape, (1024, 1024, 3))
@unittest.skipIf(re.match("1.5|2", glymur.version.openjpeg_version) is None,
"Must have openjpeg 1.5 or higher to run")
@unittest.skipIf(os.name == "nt", "Unexplained failure on windows")
def test_irreversible(self):
"""Irreversible"""

View file

@ -107,6 +107,8 @@ class TestPrinting(unittest.TestCase):
with self.assertRaises(TypeError):
glymur.set_printoptions(hi='low')
@unittest.skipIf(re.match("1.5|2", glymur.version.openjpeg_version) is None,
"Must have openjpeg 1.5 or higher to run")
def test_asoc_label_box(self):
"""verify printing of asoc, label boxes"""
# Construct a fake file with an asoc and a label box, as