progress
This commit is contained in:
parent
e2059d59e8
commit
3ebb708e11
2 changed files with 8 additions and 2 deletions
|
|
@ -1128,7 +1128,10 @@ class Jp2k(Jp2kBox):
|
||||||
|
|
||||||
event_mgr = opj.EventMgrType()
|
event_mgr = opj.EventMgrType()
|
||||||
info_handler = ctypes.cast(_INFO_CALLBACK, ctypes.c_void_p)
|
info_handler = ctypes.cast(_INFO_CALLBACK, ctypes.c_void_p)
|
||||||
event_mgr.info_handler = info_handler if verbose else None
|
if verbose or self._verbose:
|
||||||
|
event_mgr.info_handler = info_handler
|
||||||
|
else:
|
||||||
|
event_mgr.info_handler = None
|
||||||
event_mgr.warning_handler = ctypes.cast(_WARNING_CALLBACK,
|
event_mgr.warning_handler = ctypes.cast(_WARNING_CALLBACK,
|
||||||
ctypes.c_void_p)
|
ctypes.c_void_p)
|
||||||
event_mgr.error_handler = ctypes.cast(_ERROR_CALLBACK,
|
event_mgr.error_handler = ctypes.cast(_ERROR_CALLBACK,
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,7 @@ class TestSliceProtocolRead(SliceProtocolBase):
|
||||||
expected = self.j2k_data[3:8, :,:]
|
expected = self.j2k_data[3:8, :,:]
|
||||||
np.testing.assert_array_equal(actual, expected)
|
np.testing.assert_array_equal(actual, expected)
|
||||||
|
|
||||||
|
@unittest.skip('see issue 301')
|
||||||
def test_region_rlevel5(self):
|
def test_region_rlevel5(self):
|
||||||
actual = self.j2k[5:533:32, 27:423:32]
|
actual = self.j2k[5:533:32, 27:423:32]
|
||||||
expected = self.j2k_data_r5[1:17, 1:14]
|
expected = self.j2k_data_r5[1:17, 1:14]
|
||||||
|
|
@ -288,7 +289,7 @@ class TestJp2k(unittest.TestCase):
|
||||||
jpx = Jp2k(self.jpxfile)
|
jpx = Jp2k(self.jpxfile)
|
||||||
self.assertEqual(jpx.shape, (1024, 1024, 3))
|
self.assertEqual(jpx.shape, (1024, 1024, 3))
|
||||||
|
|
||||||
@unittest.skipIf(re.match("1.5|2", glymur.version.openjpeg_version) is None,
|
@unittest.skipIf(re.match("0|1.[0-4]", glymur.version.openjpeg_version),
|
||||||
"Must have openjpeg 1.5 or higher to run")
|
"Must have openjpeg 1.5 or higher to run")
|
||||||
@unittest.skipIf(os.name == "nt", "Unexplained failure on windows")
|
@unittest.skipIf(os.name == "nt", "Unexplained failure on windows")
|
||||||
def test_irreversible(self):
|
def test_irreversible(self):
|
||||||
|
|
@ -1116,6 +1117,8 @@ class TestJp2kOpjDataRootWarnings(unittest.TestCase):
|
||||||
class TestJp2kOpjDataRoot(unittest.TestCase):
|
class TestJp2kOpjDataRoot(unittest.TestCase):
|
||||||
"""These tests should be run by just about all configuration."""
|
"""These tests should be run by just about all configuration."""
|
||||||
|
|
||||||
|
@unittest.skipIf(re.match("0|1.[0-4]", glymur.version.openjpeg_version),
|
||||||
|
"Must have openjpeg 1.5 or higher to run")
|
||||||
@unittest.skipIf(os.name == "nt", fixtures.WINDOWS_TMP_FILE_MSG)
|
@unittest.skipIf(os.name == "nt", fixtures.WINDOWS_TMP_FILE_MSG)
|
||||||
def test_irreversible(self):
|
def test_irreversible(self):
|
||||||
"""Irreversible"""
|
"""Irreversible"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue