filtered out tests that should not run if openjpeg not installed
This commit is contained in:
parent
d45d74ff5d
commit
d03870cc72
3 changed files with 16 additions and 0 deletions
|
|
@ -311,6 +311,8 @@ class TestSliceProtocolRead(SliceProtocolBase):
|
||||||
expected = self.j2k.read(area=(5, 27, 533, 423), rlevel=5)
|
expected = self.j2k.read(area=(5, 27, 533, 423), rlevel=5)
|
||||||
np.testing.assert_array_equal(actual, expected)
|
np.testing.assert_array_equal(actual, expected)
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
@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 TestSliceProtocolOpjData(unittest.TestCase):
|
class TestSliceProtocolOpjData(unittest.TestCase):
|
||||||
|
|
@ -1296,6 +1298,8 @@ class TestJp2kOpjDataRoot(unittest.TestCase):
|
||||||
rgb_from_idx[r, c] = palette[idx[r, c]]
|
rgb_from_idx[r, c] = palette[idx[r, c]]
|
||||||
np.testing.assert_array_equal(rgb, rgb_from_idx)
|
np.testing.assert_array_equal(rgb, rgb_from_idx)
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
def test_read_differing_subsamples(self):
|
def test_read_differing_subsamples(self):
|
||||||
"""should error out with read used on differently subsampled images"""
|
"""should error out with read used on differently subsampled images"""
|
||||||
# Verify that we error out appropriately if we use the read method
|
# Verify that we error out appropriately if we use the read method
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ import glymur
|
||||||
from glymur import Jp2k
|
from glymur import Jp2k
|
||||||
from glymur.jp2box import FileTypeBox, ImageHeaderBox, ColourSpecificationBox
|
from glymur.jp2box import FileTypeBox, ImageHeaderBox, ColourSpecificationBox
|
||||||
|
|
||||||
|
from . import fixtures
|
||||||
from .fixtures import (
|
from .fixtures import (
|
||||||
OPJ_DATA_ROOT, MetadataBase,
|
OPJ_DATA_ROOT, MetadataBase,
|
||||||
WARNING_INFRASTRUCTURE_ISSUE, WARNING_INFRASTRUCTURE_MSG,
|
WARNING_INFRASTRUCTURE_ISSUE, WARNING_INFRASTRUCTURE_MSG,
|
||||||
|
|
@ -44,6 +45,8 @@ from .fixtures import (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
@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 TestSuite(unittest.TestCase):
|
class TestSuite(unittest.TestCase):
|
||||||
|
|
@ -479,6 +482,8 @@ class TestSuiteWarns(MetadataBase):
|
||||||
self.assertTrue(True)
|
self.assertTrue(True)
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
@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")
|
||||||
@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 1,
|
@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 1,
|
||||||
|
|
@ -574,6 +579,8 @@ class TestSuiteBands(unittest.TestCase):
|
||||||
self.assertTrue(True)
|
self.assertTrue(True)
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
@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")
|
||||||
@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 1,
|
@unittest.skipIf(glymur.version.openjpeg_version_tuple[0] == 1,
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,14 @@ import numpy as np
|
||||||
from glymur import Jp2k
|
from glymur import Jp2k
|
||||||
import glymur
|
import glymur
|
||||||
|
|
||||||
|
from . import fixtures
|
||||||
from .fixtures import OPJ_DATA_ROOT
|
from .fixtures import OPJ_DATA_ROOT
|
||||||
from .fixtures import WARNING_INFRASTRUCTURE_ISSUE, WARNING_INFRASTRUCTURE_MSG
|
from .fixtures import WARNING_INFRASTRUCTURE_ISSUE, WARNING_INFRASTRUCTURE_MSG
|
||||||
from .fixtures import mse, peak_tolerance, read_pgx, opj_data_file
|
from .fixtures import mse, peak_tolerance, read_pgx, opj_data_file
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
@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")
|
||||||
@unittest.skipIf(re.match(r'''(1|2.0.0)''',
|
@unittest.skipIf(re.match(r'''(1|2.0.0)''',
|
||||||
|
|
@ -163,6 +166,8 @@ class TestSuite2point1(unittest.TestCase):
|
||||||
with self.assertRaises(IOError):
|
with self.assertRaises(IOError):
|
||||||
j.read()
|
j.read()
|
||||||
|
|
||||||
|
@unittest.skipIf(fixtures.OPENJPEG_NOT_AVAILABLE,
|
||||||
|
fixtures.OPENJPEG_NOT_AVAILABLE_MSG)
|
||||||
@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")
|
||||||
@unittest.skipIf(re.match(r'''(1|2.0.0)''',
|
@unittest.skipIf(re.match(r'''(1|2.0.0)''',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue