Don't bother trying to write with versions below 1.5. #111
This commit is contained in:
parent
d070cc4144
commit
516d3ca55b
2 changed files with 8 additions and 3 deletions
|
|
@ -679,6 +679,9 @@ class TestJp2k15(unittest.TestCase):
|
|||
j2k.read(layer=1)
|
||||
|
||||
@unittest.skipIf(os.name == "nt", "NamedTemporaryFile issue on windows")
|
||||
@unittest.skipIf(re.match(r"""1\.[01234]\.\d""",
|
||||
OPENJPEG_VERSION) is not None,
|
||||
"Writing only supported with openjpeg version 1.5+.")
|
||||
def test_2d_rgb(self):
|
||||
"""RGB must have at least 3 components."""
|
||||
with tempfile.NamedTemporaryFile(suffix='.jp2') as tfile:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ suite.
|
|||
# pylint: disable=F0401
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
|
|
@ -19,15 +20,16 @@ else:
|
|||
import unittest
|
||||
|
||||
from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG
|
||||
from .fixtures import OPJ_DATA_ROOT, opj_data_file
|
||||
from .fixtures import OPJ_DATA_ROOT, OPENJPEG_VERSION, opj_data_file
|
||||
|
||||
from glymur import Jp2k
|
||||
import glymur
|
||||
|
||||
|
||||
@unittest.skipIf(os.name == "nt", "no write support on windows, period")
|
||||
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None,
|
||||
"Missing openjp2 library.")
|
||||
@unittest.skipIf(re.match(r"""1\.[01234]\.\d""",
|
||||
OPENJPEG_VERSION) is not None,
|
||||
"Writing only supported with openjpeg version 1.5+.")
|
||||
@unittest.skipIf(NO_READ_BACKEND, NO_READ_BACKEND_MSG)
|
||||
@unittest.skipIf(OPJ_DATA_ROOT is None,
|
||||
"OPJ_DATA_ROOT environment variable not set")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue