fixed irreversible test to match upstream, closes #309
This commit is contained in:
parent
3eae87543c
commit
80f696c600
1 changed files with 3 additions and 3 deletions
|
|
@ -1119,7 +1119,7 @@ class TestJp2kOpjDataRootWarnings(unittest.TestCase):
|
||||||
@unittest.skipIf(OPJ_DATA_ROOT is None,
|
@unittest.skipIf(OPJ_DATA_ROOT is None,
|
||||||
"OPJ_DATA_ROOT environment variable not set")
|
"OPJ_DATA_ROOT environment variable not set")
|
||||||
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 configurations."""
|
||||||
|
|
||||||
@unittest.skipIf(re.match("0|1.[0-4]", glymur.version.openjpeg_version),
|
@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")
|
||||||
|
|
@ -1128,9 +1128,9 @@ class TestJp2kOpjDataRoot(unittest.TestCase):
|
||||||
"""Irreversible"""
|
"""Irreversible"""
|
||||||
filename = opj_data_file('input/nonregression/issue141.rawl')
|
filename = opj_data_file('input/nonregression/issue141.rawl')
|
||||||
expdata = np.fromfile(filename, dtype=np.uint16)
|
expdata = np.fromfile(filename, dtype=np.uint16)
|
||||||
expdata.resize((2816, 2048))
|
expdata.resize((32, 2048))
|
||||||
with tempfile.NamedTemporaryFile(suffix='.j2k') as tfile:
|
with tempfile.NamedTemporaryFile(suffix='.j2k') as tfile:
|
||||||
j = Jp2k(tfile.name, data=expdata, irreversible=True)
|
j = Jp2k(tfile.name, data=expdata, irreversible=True, numres=5)
|
||||||
|
|
||||||
codestream = j.get_codestream()
|
codestream = j.get_codestream()
|
||||||
self.assertEqual(codestream.segment[2].spcod[8],
|
self.assertEqual(codestream.segment[2].spcod[8],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue