Merge branch 'devel' of github.com:quintusdias/glymur

Conflicts:
	glymur/test/test_jp2k.py
This commit is contained in:
jevans 2013-09-23 20:13:05 -04:00
commit f80c6261cf
4 changed files with 14 additions and 17 deletions

View file

@ -57,11 +57,10 @@ def load_tests(loader, tests, ignore):
return tests return tests
@unittest.skipIf(OPENJP2_IS_V2_OFFICIAL, @unittest.skipIf(glymur.version.openjpeg_version_tuple[0] < 2 or
"Requires v2.0.0+ in order to run.") OPENJP2_IS_V2_OFFICIAL,
"Not supported until 2.0+.")
@unittest.skipIf(os.name == "nt", "Temporary file issue on window.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.")
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None,
"Missing openjp2 library.")
class TestChannelDefinition(unittest.TestCase): class TestChannelDefinition(unittest.TestCase):
"""Test suite for channel definition boxes.""" """Test suite for channel definition boxes."""
@ -398,8 +397,6 @@ class TestColourSpecificationBox(unittest.TestCase):
approximation=approx) approximation=approx)
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None,
"Missing openjp2 library.")
class TestAppend(unittest.TestCase): class TestAppend(unittest.TestCase):
"""Tests for append method.""" """Tests for append method."""
@ -492,8 +489,6 @@ class TestAppend(unittest.TestCase):
jp2.append(uuidbox) jp2.append(uuidbox)
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None,
"Missing openjp2 library.")
class TestWrap(unittest.TestCase): class TestWrap(unittest.TestCase):
"""Tests for wrap method.""" """Tests for wrap method."""

View file

@ -55,8 +55,8 @@ def load_tests(loader, tests, ignore):
return tests return tests
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None and @unittest.skipIf(glymur.version.openjpeg_version_tuple[0] < 2 or
not OPENJP2_IS_V2_OFFICIAL, OPENJP2_IS_V2_OFFICIAL,
"Missing openjp2 library version 2.0+.") "Missing openjp2 library version 2.0+.")
class TestJp2k_2_1(unittest.TestCase): class TestJp2k_2_1(unittest.TestCase):
"""Test suite for version 2.0+ of openjpeg software""" """Test suite for version 2.0+ of openjpeg software"""

View file

@ -12,6 +12,7 @@ seem like logical negative tests to add.
# pylint: disable=F0401 # pylint: disable=F0401
import os import os
import re
import sys import sys
import tempfile import tempfile
@ -22,16 +23,15 @@ else:
import numpy as np import numpy as np
from .fixtures import read_image, NO_READ_BACKEND, NO_READ_BACKEND_MSG from .fixtures import OPJ_DATA_ROOT, opj_data_file, read_image
from .fixtures import OPJ_DATA_ROOT, opj_data_file from .fixtures import NO_READ_BACKEND, NO_READ_BACKEND_MSG
from glymur import Jp2k from glymur import Jp2k
import glymur import glymur
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, @unittest.skipIf(re.match(r"""1\.[01234]""", glymur.version.openjpeg_version),
"Missing openjp2 library.") "Functionality not implemented for 1.3, 1.4")
@unittest.skipIf(NO_READ_BACKEND, NO_READ_BACKEND_MSG)
@unittest.skipIf(OPJ_DATA_ROOT is None, @unittest.skipIf(OPJ_DATA_ROOT is None,
"OPJ_OPJ_DATA_ROOT environment variable not set") "OPJ_OPJ_DATA_ROOT environment variable not set")
class TestSuiteNegative(unittest.TestCase): class TestSuiteNegative(unittest.TestCase):
@ -44,6 +44,7 @@ class TestSuiteNegative(unittest.TestCase):
def tearDown(self): def tearDown(self):
pass pass
@unittest.skipIf(NO_READ_BACKEND, NO_READ_BACKEND_MSG)
@unittest.skipIf(os.name == "nt", "Temporary file issue on window.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.")
def test_psnr_with_cratios(self): def test_psnr_with_cratios(self):
"""Using psnr with cratios options is not allowed.""" """Using psnr with cratios options is not allowed."""

View file

@ -10,6 +10,7 @@
# pylint: disable=R0904 # pylint: disable=R0904
import os import os
import re
import struct import struct
import sys import sys
import tempfile import tempfile
@ -36,8 +37,8 @@ from .fixtures import OPJ_DATA_ROOT, opj_data_file
@unittest.skipIf(os.name == "nt", "Temporary file issue on window.") @unittest.skipIf(os.name == "nt", "Temporary file issue on window.")
@unittest.skipIf(glymur.lib.openjp2.OPENJP2 is None, @unittest.skipIf(re.match(r"""1\.[01234]""", glymur.version.openjpeg_version),
"Missing openjp2 library.") "Need at least 1.5 in order to write jp2 files.")
class TestPrintingNeedsLib(unittest.TestCase): class TestPrintingNeedsLib(unittest.TestCase):
"""These tests require the library, mostly in order to just setup the test. """These tests require the library, mostly in order to just setup the test.
""" """