Qualified on 1.3, 1.4. Closes #116
This commit is contained in:
parent
7622b94073
commit
bc1421bb19
1 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ These tests deal with JPX/JP2/J2K images in the format-corpus repository.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.hexversion < 0x02070000:
|
if sys.hexversion < 0x02070000:
|
||||||
|
|
@ -19,6 +20,7 @@ if sys.hexversion < 0x02070000:
|
||||||
else:
|
else:
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
import glymur
|
||||||
from glymur import Jp2k
|
from glymur import Jp2k
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -39,6 +41,9 @@ except KeyError:
|
||||||
class TestSuiteFormatCorpus(unittest.TestCase):
|
class TestSuiteFormatCorpus(unittest.TestCase):
|
||||||
"""Test suite for files in format corpus repository."""
|
"""Test suite for files in format corpus repository."""
|
||||||
|
|
||||||
|
@unittest.skipIf(re.match(r"""1\.[0123]""",
|
||||||
|
glymur.version.openjpeg_version) is not None,
|
||||||
|
"Needs 1.3+ to catch this.")
|
||||||
def test_balloon_trunc1(self):
|
def test_balloon_trunc1(self):
|
||||||
"""Has one byte shaved off of EOC marker."""
|
"""Has one byte shaved off of EOC marker."""
|
||||||
jfile = os.path.join(FORMAT_CORPUS_DATA_ROOT,
|
jfile = os.path.join(FORMAT_CORPUS_DATA_ROOT,
|
||||||
|
|
@ -54,6 +59,9 @@ class TestSuiteFormatCorpus(unittest.TestCase):
|
||||||
with self.assertRaises(OSError):
|
with self.assertRaises(OSError):
|
||||||
j2k.read(rlevel=-1)
|
j2k.read(rlevel=-1)
|
||||||
|
|
||||||
|
@unittest.skipIf(re.match(r"""1\.[01234]""",
|
||||||
|
glymur.version.openjpeg_version) is not None,
|
||||||
|
"Needs 1.4+ to catch this.")
|
||||||
def test_balloon_trunc2(self):
|
def test_balloon_trunc2(self):
|
||||||
"""Shortened by 5000 bytes."""
|
"""Shortened by 5000 bytes."""
|
||||||
jfile = os.path.join(FORMAT_CORPUS_DATA_ROOT,
|
jfile = os.path.join(FORMAT_CORPUS_DATA_ROOT,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue