[Git][debian-gis-team/glymur][upstream] New upstream version 0.12.1

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sat Dec 3 06:59:52 GMT 2022



Antonio Valentino pushed to branch upstream at Debian GIS Project / glymur


Commits:
9d9b0c64 by Antonio Valentino at 2022-12-03T06:48:12+00:00
New upstream version 0.12.1
- - - - -


27 changed files:

- CHANGES.txt
- README.md
- appveyor.yml
- ci/travis-310.yaml
- ci/travis-37.yaml → ci/travis-311.yaml
- − ci/travis-37-no-gdal.yaml
- − ci/travis-37-no-opj.yaml
- docs/source/conf.py
- docs/source/introduction.rst
- docs/source/whatsnew/0.12.rst
- glymur/data/__init__.py
- glymur/jp2box.py
- glymur/jp2k.py
- glymur/version.py
- setup.cfg
- tests/fixtures.py
- tests/test_codestream.py
- tests/test_colour_specification_box.py
- tests/test_jp2box.py
- tests/test_jp2box_jpx.py
- tests/test_jp2box_uuid.py
- tests/test_jp2box_xml.py
- tests/test_jp2k.py
- tests/test_printing.py
- tests/test_set_decoded_components.py
- tests/test_tiff2jp2.py
- tests/test_warnings.py


Changes:

=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,8 @@
+November 28, 2022 - v0.12.1
+    Do not error out for JP2 files with multiple codestreams.
+    Relax validation for invalid JP2 files with multiple jp2h boxes.
+    Drop support for python 3.7.
+
 October 20, 2022 - v0.12.0
     Add support for ICC profiles, colormaps when converting from TIFF.
     Add shortcut for retrieving lowest resolution thumbnail.


=====================================
README.md
=====================================
@@ -3,6 +3,6 @@ glymur: a Python interface for JPEG 2000
 
 **glymur** contains a Python interface to the OpenJPEG library which
 allows one to read and write JPEG 2000 files.  **glymur** works on
-Python 3.7, 3.8, 3.9, and 3.10.
+Python 3.8, 3.9, 3.10, and 3.11.
 
 Please read the docs, https://glymur.readthedocs.org/en/latest/


=====================================
appveyor.yml
=====================================
@@ -12,12 +12,6 @@ environment:
 
   matrix:
 
-    - CONDA_ROOT: "C:\\Miniconda3_64"
-      PYTHON_VERSION: "3.7"
-      PYTHON_ARCH: "64"
-      CONDA_PY: "37"
-      CONDA_NPY: "21"
-
     - CONDA_ROOT: "C:\\Miniconda3_64"
       PYTHON_VERSION: "3.8"
       PYTHON_ARCH: "64"
@@ -46,6 +40,13 @@ environment:
       CONDA_NPY: "21"
       USE_PATH_FOR_GDAL_PYTHON: "YES"
 
+    - CONDA_ROOT: "C:\\Miniconda3_64"
+      PYTHON_VERSION: "3.11"
+      PYTHON_ARCH: "64"
+      CONDA_PY: "311"
+      CONDA_NPY: "21"
+      USE_PATH_FOR_GDAL_PYTHON: "YES"
+
 # We always use a 64-bit machine, but can build x86 distributions
 # with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
 platform:


=====================================
ci/travis-310.yaml
=====================================
@@ -1,6 +1,6 @@
 name: glymur
 channels:
-    - conda-forge
+    - defaults
 dependencies:
     - python=3.10.*
     - gdal


=====================================
ci/travis-37.yaml → ci/travis-311.yaml
=====================================
@@ -1,12 +1,12 @@
 name: glymur
 channels:
-    - defaults
+    - conda-forge
 dependencies:
-    - python=3.7.*
+    - python=3.11.*
     - gdal
+    - libtiff
     - lxml
     - numpy
     - openjpeg
-    - scikit-image
-    - libtiff
     - pytest-xdist
+    - scikit-image


=====================================
ci/travis-37-no-gdal.yaml deleted
=====================================
@@ -1,10 +0,0 @@
-name: glymur
-channels:
-    - defaults
-dependencies:
-    - python=3.7.*
-    - lxml
-    - numpy
-    - openjpeg
-    - scikit-image
-    - libtiff


=====================================
ci/travis-37-no-opj.yaml deleted
=====================================
@@ -1,11 +0,0 @@
-name: glymur
-channels:
-    - defaults
-dependencies:
-    - python=3.7.*
-    - gdal
-    - lxml
-    - numpy
-    - pip
-    - scikit-image
-    - libtiff


=====================================
docs/source/conf.py
=====================================
@@ -78,7 +78,7 @@ copyright = '2013-2022, John Evans'
 # The short X.Y version.
 version = '0.12'
 # The full version, including alpha/beta/rc tags.
-release = '0.12.0'
+release = '0.12.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.


=====================================
docs/source/introduction.rst
=====================================
@@ -12,8 +12,7 @@ In regards to metadata, most JP2 boxes are properly interpreted.
 Certain optional JP2 boxes can also be written, including XML boxes and
 XMP UUIDs.  There is incomplete support for reading JPX metadata.
 
-The current version of glymur works on Python versions 3.7, 3.8, 3.9,
-and 3.10.
+The current version of glymur is supported on Python versions 3.8, 3.9, 3.10, and 3.11.
 
 For more information about OpenJPEG, please consult http://www.openjpeg.org.
 


=====================================
docs/source/whatsnew/0.12.rst
=====================================
@@ -2,6 +2,13 @@
 Changes in glymur 0.12
 ######################
 
+*****************
+Changes in 0.12.1
+*****************
+    * Do not error out for JP2 files with multiple codestreams.
+    * Relax validation for invalid JP2 files with multiple jp2h boxes.
+    * Drop support for python 3.7.
+
 *****************
 Changes in 0.12.0
 *****************


=====================================
glymur/data/__init__.py
=====================================
@@ -7,6 +7,7 @@ These include:
 
 """
 import importlib.resources as ir
+import sys
 
 
 def nemo():
@@ -17,8 +18,7 @@ def nemo():
     file : str
         Platform-independent path to nemo.jp2.
     """
-    with ir.path('glymur.data', 'nemo.jp2') as filename:
-        return str(filename)
+    return _str_path_to('nemo.jp2')
 
 
 def goodstuff():
@@ -29,8 +29,7 @@ def goodstuff():
     file : str
         Platform-independent path to goodstuff.j2k.
     """
-    with ir.path('glymur.data', 'goodstuff.j2k') as filename:
-        return str(filename)
+    return _str_path_to('goodstuff.j2k')
 
 
 def jpxfile():
@@ -41,5 +40,15 @@ def jpxfile():
     file : str
         Platform-independent path to 12-v6.4.jpx
     """
-    with ir.path('glymur.data', 'heliov.jpx') as filename:
-        return str(filename)
+    return _str_path_to('heliov.jpx')
+
+
+def _str_path_to(filename):
+    """
+    Hide differences between 3.9.0 and below.
+    """
+    if sys.version_info[1] >= 9:
+        return str(ir.files('glymur.data').joinpath(filename))
+    else:
+        with ir.path('glymur.data', filename) as path:
+            return str(path)


=====================================
glymur/jp2box.py
=====================================
@@ -72,6 +72,14 @@ _EXIF_UUID = UUID(bytes=b'JpgTiffExif->JP2')
 _XMP_UUID = UUID('be7acfcb-97a9-42e8-9c71-999491e3afac')
 
 
+class InvalidJp2kWarning(RuntimeError):
+    """
+    Issue this warning in case the file is technically invalid but we can
+    still read the image.
+    """
+    pass
+
+
 class InvalidJp2kError(RuntimeError):
     """
     Raise this exception in case we cannot parse a valid JP2 file.


=====================================
glymur/jp2k.py
=====================================
@@ -680,8 +680,25 @@ class Jp2k(Jp2kBox):
                 )
                 warnings.warn(msg, UserWarning)
 
-        # We need to have one and only one JP2C box if we have a JP2 file.
-        if len([box for box in self.box if box.box_id == 'jp2c']) != 1:
+        # We need to have one and only one JP2H box if we have a JP2 file.
+        num_jp2h_boxes = len([box for box in self.box if box.box_id == 'jp2h'])
+        if num_jp2h_boxes > 1:
+            msg = (
+                f"This file has {num_jp2h_boxes} JP2H boxes in the outermost "
+                "layer of boxes.  There should only be one."
+            )
+            warnings.warn(msg)
+
+        # We should have one and only one JP2C box if we have a JP2 file..
+        num_jp2c_boxes = len([box for box in self.box if box.box_id == 'jp2c'])
+        if num_jp2c_boxes > 1 and self.box[1].brand == 'jp2 ':
+            msg = (
+                f"This file claims to be JP2 but has {num_jp2c_boxes} JP2C "
+                "boxes in the outermost layer of boxes.  All JP2C boxes after "
+                "the first will be ignored."
+            )
+            warnings.warn(msg)
+        elif num_jp2c_boxes == 0:
             msg = (
                 "A valid JP2C box was not found in the outermost level of JP2 "
                 "boxes.  The JP2 file is invalid."


=====================================
glymur/version.py
=====================================
@@ -21,7 +21,7 @@ from .lib import tiff
 
 # Do not change the format of this next line!  Doing so risks breaking
 # setup.py
-version = "0.12.0"
+version = "0.12.1"
 
 version_tuple = parse(version).release
 


=====================================
setup.cfg
=====================================
@@ -1,6 +1,6 @@
 [metadata]
 name = Glymur
-version = 0.12.0
+version = 0.12.1
 author = 'John Evans'
 author_email = "John Evans" <john.g.evans.ne at gmail.com>
 license = 'MIT'
@@ -12,10 +12,10 @@ long_description =
 url = https://github.com/quintusdias/glymur
 classifiers =
     Programming Language :: Python
-    Programming Language :: Python :: 3.7
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9
     Programming Language :: Python :: 3.10
+    Programming Language :: Python :: 3.11
     Programming Language :: Python :: Implementation :: CPython
     License :: OSI Approved :: MIT License
     Intended Audience :: Science/Research
@@ -28,7 +28,7 @@ install_requires =
     numpy
     lxml
     packaging
-python_requires = >=3.7
+python_requires = >=3.8
 include_package_data = True
 zip_safe = False
 


=====================================
tests/fixtures.py
=====================================
@@ -2,8 +2,10 @@
 Test fixtures common to more than one test point.
 """
 # Standard library imports
+import importlib.resources as ir
 import pathlib
 import shutil
+import sys
 import tempfile
 import unittest
 
@@ -176,3 +178,25 @@ TEXT_GBR_34 = load_test_data('text_gbr_34')
 TEXT_GBR_35 = load_test_data('text_gbr_35')
 TEXT_GBR_RREQ = load_test_data('text_GBR_rreq')
 P1_07 = load_test_data('p1_07')
+
+
+def _path_to(filename):
+    """
+    Hide importlib.resources differences between 3.11.0 and below.
+    """
+    if sys.version_info[1] >= 9:
+        return ir.files('tests.data').joinpath(filename)
+    else:
+        with ir.path('tests.data', filename) as path:
+            return path
+
+
+def _read_bytes(filename):
+    """
+    Hide importlib.resources differences between 3.9.0 and below.
+    """
+    if sys.version_info[1] >= 9:
+        return ir.files('tests.data').joinpath(filename).read_bytes()
+    else:
+        with ir.path('tests.data', filename) as path:
+            return path.read_bytes()


=====================================
tests/test_codestream.py
=====================================
@@ -4,7 +4,6 @@ Test suite for codestream oddities
 """
 
 # Standard library imports ...
-import importlib.resources as ir
 from io import BytesIO
 import struct
 import unittest
@@ -13,18 +12,18 @@ import warnings
 # Local imports ...
 import glymur
 from glymur import Jp2k
-from . import fixtures, data
+from . import fixtures
 
 
 class TestSuite(unittest.TestCase):
     """Test suite for ICC Profile code."""
 
     def setUp(self):
-        self.p0_03 = ir.path(data, 'p0_03.j2k')
-        self.p0_06 = ir.path(data, 'p0_06.j2k')
-        self.p1_06 = ir.path(data, 'p1_06.j2k')
-        self.issue142 = ir.path(data, 'issue142.j2k')
-        self.edf_c2_1178956 = ir.path(data, 'edf_c2_1178956.jp2')
+        self.p0_03 = fixtures._path_to('p0_03.j2k')
+        self.p0_06 = fixtures._path_to('p0_06.j2k')
+        self.p1_06 = fixtures._path_to('p1_06.j2k')
+        self.issue142 = fixtures._path_to('issue142.j2k')
+        self.edf_c2_1178956 = fixtures._path_to('edf_c2_1178956.jp2')
 
     def test_tlm_segment(self):
         """
@@ -32,8 +31,8 @@ class TestSuite(unittest.TestCase):
 
         In this case there's only a single tile.
         """
-        with ir.path(data, 'p0_06.j2k') as path:
-            j2k = Jp2k(path)
+        path = fixtures._path_to('p0_06.j2k')
+        j2k = Jp2k(path)
 
         buffer = b'\xffU\x00\x08\x00@\x00\x00YW'
         b = BytesIO(buffer[2:])
@@ -50,8 +49,8 @@ class TestSuite(unittest.TestCase):
         """
         Verify parsing of the PPT segment
         """
-        with ir.path(data, 'p1_06.j2k') as path:
-            j2k = Jp2k(path)
+        path = fixtures._path_to('p1_06.j2k')
+        j2k = Jp2k(path)
         c = j2k.get_codestream(header_only=False)
         self.assertEqual(c.segment[6].zppt, 0)
 
@@ -59,8 +58,8 @@ class TestSuite(unittest.TestCase):
         """
         Verify parsing of the PLT segment
         """
-        with ir.path(data, 'issue142.j2k') as path:
-            c = Jp2k(path).get_codestream(header_only=False)
+        path = fixtures._path_to('issue142.j2k')
+        c = Jp2k(path).get_codestream(header_only=False)
         self.assertEqual(c.segment[7].zplt, 0)
         self.assertEqual(len(c.segment[7].iplt), 59)
 
@@ -68,11 +67,11 @@ class TestSuite(unittest.TestCase):
         """
         Verify parsing of the PPM segment
         """
-        with ir.path(data, 'edf_c2_1178956.jp2') as path:
-            with warnings.catch_warnings():
-                # Lots of things wrong with this file.
-                warnings.simplefilter('ignore')
-                jp2 = Jp2k(path)
+        path = fixtures._path_to('edf_c2_1178956.jp2')
+        with warnings.catch_warnings():
+            # Lots of things wrong with this file.
+            warnings.simplefilter('ignore')
+            jp2 = Jp2k(path)
         c = jp2.get_codestream()
         self.assertEqual(c.segment[2].zppm, 0)
         self.assertEqual(len(c.segment[2].data), 9)
@@ -81,8 +80,8 @@ class TestSuite(unittest.TestCase):
         """
         Verify parsing of the CRG segment
         """
-        with ir.path(data, 'p0_03.j2k') as path:
-            j2k = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j2k = Jp2k(path)
         c = j2k.get_codestream()
         self.assertEqual(c.segment[6].xcrg, (65424,))
         self.assertEqual(c.segment[6].ycrg, (32558,))
@@ -91,8 +90,8 @@ class TestSuite(unittest.TestCase):
         """
         Verify parsing of the RGN segment
         """
-        with ir.path(data, 'p0_06.j2k') as path:
-            j2k = Jp2k(path)
+        path = fixtures._path_to('p0_06.j2k')
+        j2k = Jp2k(path)
         c = j2k.get_codestream()
         self.assertEqual(c.segment[-1].crgn, 0)
         self.assertEqual(c.segment[-1].srgn, 0)


=====================================
tests/test_colour_specification_box.py
=====================================
@@ -5,7 +5,6 @@ Test suite specifically targeting ICC profiles
 
 # Standard library imports ...
 from datetime import datetime
-import importlib.resources as ir
 import struct
 import tempfile
 import unittest
@@ -23,7 +22,7 @@ from glymur.jp2box import (
     ImageHeaderBox, JP2HeaderBox, JPEG2000SignatureBox, InvalidJp2kError
 )
 from glymur.core import SRGB
-from . import fixtures, data
+from . import fixtures
 
 
 class TestColourSpecificationBox(fixtures.TestCommon):
@@ -48,7 +47,7 @@ class TestColourSpecificationBox(fixtures.TestCommon):
             num_components=num_components
         )
 
-        self.icc_profile = ir.read_binary(data, 'sgray.icc')
+        self.icc_profile = fixtures._read_bytes('sgray.icc')
 
     def test_bad_method_printing(self):
         """
@@ -58,14 +57,14 @@ class TestColourSpecificationBox(fixtures.TestCommon):
         EXPECTED RESULT:  Warnings are issued.  Printing the string
         representation should not error out.
         """
-        with ir.path(data, 'issue405.dat') as path:
-            with path.open('rb') as f:
-                f.seek(8)
-                with warnings.catch_warnings():
-                    # Lots of things wrong with this file.
-                    warnings.simplefilter('ignore')
-                    box = ColourSpecificationBox.parse(f, length=80, offset=0)
-                    str(box)
+        path = fixtures._path_to('issue405.dat')
+        with path.open('rb') as f:
+            f.seek(8)
+            with warnings.catch_warnings():
+                # Lots of things wrong with this file.
+                warnings.simplefilter('ignore')
+                box = ColourSpecificationBox.parse(f, length=80, offset=0)
+                str(box)
 
     def test_colr_with_out_enum_cspace(self):
         """must supply an enumerated colorspace when writing"""
@@ -153,7 +152,7 @@ class TestSuite(unittest.TestCase):
     """Test suite for ICC Profile code."""
 
     def setUp(self):
-        self.buffer = ir.read_binary(data, 'sgray.icc')
+        self.buffer = fixtures._read_bytes('sgray.icc')
 
     def test_bad_rendering_intent(self):
         """
@@ -184,10 +183,10 @@ class TestSuite(unittest.TestCase):
 
         EXPECTED RESULT:  Verify the ICC profile metadata.
         """
-        with ir.path(data, 'text_GBR.jp2') as path:
-            with self.assertWarns(UserWarning):
-                # The brand is wrong, this is JPX, not JP2.
-                j = Jp2k(path)
+        path = fixtures._path_to('text_GBR.jp2')
+        with self.assertWarns(UserWarning):
+            # The brand is wrong, this is JPX, not JP2.
+            j = Jp2k(path)
         box = j.box[3].box[1]
 
         self.assertEqual(box.icc_profile_header['Size'], 1328)


=====================================
tests/test_jp2box.py
=====================================
@@ -2,7 +2,6 @@
 """
 # Standard library imports ...
 import doctest
-import importlib.resources as ir
 from io import BytesIO
 import os
 import pathlib
@@ -28,7 +27,7 @@ from glymur.jp2box import (
 )
 from glymur.core import COLOR, OPACITY, SRGB, GREYSCALE
 from glymur.core import RED, GREEN, BLUE, GREY, WHOLE_IMAGE
-from . import fixtures, data
+from . import fixtures
 from .fixtures import MetadataBase
 from .fixtures import OPENJPEG_NOT_AVAILABLE, OPENJPEG_NOT_AVAILABLE_MSG
 
@@ -377,12 +376,12 @@ class TestFileTypeBox(fixtures.TestCommon):
 
         EXPECTED RESULT:  RuntimeError
         """
-        with ir.path(data, 'issue396.jp2') as path:
-            with warnings.catch_warnings():
-                # Lots of things wrong with this file.
-                warnings.simplefilter('ignore')
-                with self.assertRaises(InvalidJp2kError):
-                    Jp2k(path)
+        path = fixtures._path_to('issue396.jp2')
+        with warnings.catch_warnings():
+            # Lots of things wrong with this file.
+            warnings.simplefilter('ignore')
+            with self.assertRaises(InvalidJp2kError):
+                Jp2k(path)
 
     def test_brand_unknown(self):
         """A ftyp box brand must be 'jp2 ' or 'jpx '."""
@@ -1053,9 +1052,9 @@ class TestJp2Boxes(fixtures.TestCommon):
 
     def test_no_jp2c_box(self):
         """
-        SCENARIO:  The JP2/JP2C box cannot be parsed.
+        SCENARIO:  The JP2 file has no JP2C box.
 
-        EXPECTED RESULT:  An RuntimeError is issued.
+        EXPECTED RESULT:  An InvalidJp2kError is issued.
         """
         # Write a new JP2 file that omits the JP2C box.
         j = Jp2k(self.jp2file)
@@ -1069,6 +1068,64 @@ class TestJp2Boxes(fixtures.TestCommon):
             with self.assertRaises(InvalidJp2kError):
                 Jp2k(tfile.name)
 
+    def test_two_jp2c_boxes(self):
+        """
+        SCENARIO:  There are two jp2c boxes.
+
+        EXPECTED RESULT:  Technically this is valid but it is still possible
+        to read the first image.  A warning is issued since the 2nd image
+        cannot be accessed.
+        """
+        # Write a new JP2 file that duplicates the JP2C box.
+        j = Jp2k(self.jp2file)
+        jp2c = [box for box in j.box if box.box_id == 'jp2c'][0]
+        with open(self.temp_jp2_filename, mode='wb') as tfile:
+            with open(self.jp2file, 'rb') as ifile:
+                tfile.write(ifile.read())
+
+                # now tack the jp2c box on again
+                ifile.seek(jp2c.offset)
+                tfile.write(ifile.read())
+
+            tfile.flush()
+
+            with self.assertWarns(UserWarning):
+                j2 = Jp2k(tfile.name)
+
+        np.testing.assert_array_equal(j[:], j2[:])
+
+    def test_two_jp2h_boxes(self):
+        """
+        SCENARIO:  There are two jp2h boxes and two jp2c boxes.
+
+        EXPECTED RESULT:  Technically this is invalid due to the multiple jp2h
+        boxes.  It is still possible to read the first image.  Multiple
+        warnings are issued.
+        """
+        # Write a new JP2 file that duplicates the JP2C box.
+        j = Jp2k(self.jp2file)
+        jp2h = [box for box in j.box if box.box_id == 'jp2h'][0]
+        with open(self.temp_jp2_filename, mode='wb') as tfile:
+            with open(self.jp2file, 'rb') as ifile:
+                tfile.write(ifile.read())
+
+                # now tack the jp2c box on again
+                ifile.seek(jp2h.offset)
+                tfile.write(ifile.read())
+
+            tfile.flush()
+
+            # Warns because of two codestream, warns because of two jp2h boxes.
+            with self.assertWarns(UserWarning) as cm:
+                j2 = Jp2k(tfile.name)
+                self.assertEqual(len(cm.warnings), 2)
+
+        with warnings.catch_warnings():
+            # Another warning when this file is read.  It is a library warning
+            # so ignore it.
+            warnings.simplefilter('ignore')
+            np.testing.assert_array_equal(j[:], j2[:])
+
     def test_default_jp2k(self):
         """Should be able to instantiate a JPEG2000SignatureBox"""
         jp2k = glymur.jp2box.JPEG2000SignatureBox()


=====================================
tests/test_jp2box_jpx.py
=====================================
@@ -4,7 +4,6 @@ Test suite specifically targeting JPX box layout.
 """
 # Standard library imports ...
 import ctypes
-import importlib.resources as ir
 from io import BytesIO
 import shutil
 import struct
@@ -21,7 +20,7 @@ from glymur.jp2box import (
     DataEntryURLBox, FileTypeBox, JPEG2000SignatureBox, DataReferenceBox,
     FragmentListBox, FragmentTableBox, ColourSpecificationBox, InvalidJp2kError
 )
-from . import fixtures, data
+from . import fixtures
 
 
 class TestJPXWrap(fixtures.TestCommon):
@@ -440,10 +439,10 @@ class TestJPX(fixtures.TestCommon):
 
         EXPECTED RESULT:  The box is parsed without error.
         """
-        with ir.path(data, 'text_GBR.jp2') as path:
-            with warnings.catch_warnings():
-                warnings.simplefilter('ignore')
-                j = Jp2k(path)
+        path = fixtures._path_to('text_GBR.jp2')
+        with warnings.catch_warnings():
+            warnings.simplefilter('ignore')
+            j = Jp2k(path)
 
         self.assertEqual(len(j.box[2].vendor_feature), 4)
 
@@ -454,10 +453,10 @@ class TestJPX(fixtures.TestCommon):
 
         EXPECTED RESULT:  NotImplementedError
         """
-        with ir.path(data, 'text_GBR.jp2') as path:
-            with warnings.catch_warnings():
-                warnings.simplefilter('ignore')
-                j = Jp2k(path)
+        path = fixtures._path_to('text_GBR.jp2')
+        with warnings.catch_warnings():
+            warnings.simplefilter('ignore')
+            j = Jp2k(path)
 
         box = j.box[2]
 


=====================================
tests/test_jp2box_uuid.py
=====================================
@@ -2,7 +2,6 @@
 """Test suite for printing.
 """
 # Standard library imports
-import importlib.resources as ir
 import io
 import shutil
 import struct
@@ -18,7 +17,7 @@ import numpy as np
 import glymur
 from glymur import Jp2k
 from glymur.jp2box import UUIDBox
-from . import fixtures, data
+from . import fixtures
 
 TIFF_ASCII = 2
 TIFF_SHORT = 3
@@ -206,7 +205,7 @@ class TestSuite(fixtures.TestCommon):
         EXPECTED RESULT:  Should not error out.  Verify the UUID type.  Verify
         the existance of one of the "Exif.Photo" tags.
         """
-        box_data = ir.read_binary('tests.data', 'issue549.dat')
+        box_data = fixtures._read_bytes('issue549.dat')
         bf = io.BytesIO(box_data)
         box = UUIDBox.parse(bf, 0, len(box_data))
 
@@ -226,7 +225,7 @@ class TestSuite(fixtures.TestCommon):
 
         EXPECTED RESULT:  RuntimeError
         """
-        box_data = ir.read_binary('tests.data', 'issue549.dat')
+        box_data = fixtures._read_bytes('issue549.dat')
         bf = io.BytesIO(box_data[:16] + box_data[20:])
         with warnings.catch_warnings():
             warnings.simplefilter("ignore")
@@ -243,7 +242,7 @@ class TestSuite(fixtures.TestCommon):
         EXPECTED RESULT:  Should not error out.  There is a warning about GDAL
         not being able to print the UUID data as expected.
         """
-        box_data = ir.read_binary('tests.data', '0220000800_uuid.dat')
+        box_data = fixtures._read_bytes('0220000800_uuid.dat')
         bf = io.BytesIO(box_data)
         bf.seek(8)
         box = UUIDBox.parse(bf, 0, 703)
@@ -367,12 +366,12 @@ class TestSuite(fixtures.TestCommon):
         EXPECTED RESULT:  No errors.  There is a warning issued when we try
         to print the box.
         """
-        with ir.path(data, 'issue398.dat') as path:
-            with path.open('rb') as f:
-                f.seek(8)
-                with warnings.catch_warnings(record=True) as w:
-                    box = glymur.jp2box.UUIDBox.parse(f, 0, 380)
-                    str(box)
+        path = fixtures._path_to('issue398.dat')
+        with path.open('rb') as f:
+            f.seek(8)
+            with warnings.catch_warnings(record=True) as w:
+                box = glymur.jp2box.UUIDBox.parse(f, 0, 380)
+                str(box)
 
         if fixtures._HAVE_GDAL:
             self.assertEqual(len(w), 1)
@@ -398,7 +397,7 @@ class TestSuiteHiRISE(fixtures.TestCommon):
 
         uuidinfo = glymur.jp2box.UUIDInfoBox([ulst, debox])
 
-        uuid_data = ir.read_binary(data, 'degenerate_geotiff.tif')
+        uuid_data = fixtures._read_bytes('degenerate_geotiff.tif')
         the_uuid = uuid.UUID('b14bf8bd-083d-4b43-a5ae-8cd7d5a6ce03')
         geotiff_uuid = glymur.jp2box.UUIDBox(the_uuid, uuid_data)
 


=====================================
tests/test_jp2box_xml.py
=====================================
@@ -3,7 +3,6 @@
 Test suite specifically targeting the JP2 XML box layout.
 """
 # Standard library imports
-import importlib.resources as ir
 from io import BytesIO
 import pathlib
 import struct
@@ -21,7 +20,7 @@ from glymur.jp2box import (
 )
 from glymur.jp2box import JPEG2000SignatureBox
 
-from . import fixtures, data
+from . import fixtures
 
 
 class TestXML(fixtures.TestCommon):
@@ -159,7 +158,7 @@ class TestXML(fixtures.TestCommon):
 
         EXPECTED RESULT:  The xml box is validated.
         """
-        xmldata = ir.read_binary(data, 'encoding_declaration.xml')
+        xmldata = fixtures._read_bytes('encoding_declaration.xml')
         with open(self.temp_jp2_filename, mode="wb") as ofile:
             with open(self.jp2file, mode='rb') as ifile:
                 ofile.write(ifile.read())


=====================================
tests/test_jp2k.py
=====================================
@@ -5,7 +5,6 @@ Tests for general glymur functionality.
 import collections
 import datetime
 import doctest
-import importlib.resources as ir
 from io import BytesIO
 import os
 import pathlib
@@ -30,7 +29,7 @@ from glymur.core import COLOR, RED, GREEN, BLUE, RESTRICTED_ICC_PROFILE
 
 from .fixtures import OPENJPEG_NOT_AVAILABLE, OPENJPEG_NOT_AVAILABLE_MSG
 
-from . import fixtures, data
+from . import fixtures
 
 
 def docTearDown(doctest_obj):  # pragma: no cover
@@ -86,8 +85,8 @@ class TestJp2k(fixtures.TestCommon):
 
         Expected response:  the dtype property is np.uint16
         """
-        with ir.path('tests.data', 'uint16.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('uint16.j2k')
+        j = Jp2k(path)
         self.assertEqual(j.dtype, np.uint16)
 
     def test_cod_segment_not_3rd(self):
@@ -107,8 +106,8 @@ class TestJp2k(fixtures.TestCommon):
 
         Expected response:  the dtype property is np.int8
         """
-        with ir.path('tests.data', 'p0_03.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j = Jp2k(path)
         self.assertEqual(j.dtype, np.int8)
 
     def test_dtype_inconsistent_bitdetph(self):
@@ -117,8 +116,8 @@ class TestJp2k(fixtures.TestCommon):
 
         Expected response:  TypeError when accessing the dtype property.
         """
-        with ir.path('tests.data', 'issue982.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('issue982.j2k')
+        j = Jp2k(path)
         with self.assertRaises(TypeError):
             j.dtype
 
@@ -146,8 +145,8 @@ class TestJp2k(fixtures.TestCommon):
 
         Expected response:  the ndim attribute/property is 2
         """
-        with ir.path('tests.data', 'p0_02.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_02.j2k')
+        j = Jp2k(path)
         self.assertEqual(j.ndim, 2)
 
     def test_read_bands_unequal_subsampling(self):
@@ -157,8 +156,8 @@ class TestJp2k(fixtures.TestCommon):
 
         EXPECTED RESPONSE: The image is a list of arrays of unequal size..
         """
-        with ir.path(data, 'p0_06.j2k') as path:
-            d = Jp2k(path).read_bands()
+        path = fixtures._path_to('p0_06.j2k')
+        d = Jp2k(path).read_bands()
 
         actual = [band.shape for band in d]
         expected = [(129, 513), (129, 257), (65, 513), (65, 257)]
@@ -378,9 +377,9 @@ class TestJp2k(fixtures.TestCommon):
 
         EXPECTED RESULT:  RuntimeError
         """
-        with ir.path(glymur, 'jp2k.py') as path:
-            with self.assertRaises(InvalidJp2kError):
-                Jp2k(path)
+        path = fixtures._path_to('nemo.txt')
+        with self.assertRaises(InvalidJp2kError):
+            Jp2k(path)
 
     def test_file_does_not_exist(self):
         """
@@ -930,8 +929,8 @@ class TestJp2k(fixtures.TestCommon):
 
         EXPECTED RESULT:  The 2nd image read in is not the same as the first.
         """
-        with ir.path(data, 'p0_03.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j = Jp2k(path)
         d0 = j[:]
 
         j.layer = 1
@@ -946,8 +945,8 @@ class TestJp2k(fixtures.TestCommon):
         EXPECTED RESULT:  RuntimeError when an invalid layer number is supplied
         """
         # There are 8 layers, so only values [0-7] are valid.
-        with ir.path(data, 'p0_03.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j = Jp2k(path)
 
         with self.assertRaises(ValueError):
             j.layer = -1
@@ -965,8 +964,8 @@ class TestJp2k(fixtures.TestCommon):
 
         EXPECTED RESULT:  The default verbosity setting is False.
         """
-        with ir.path(data, 'p0_03.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j = Jp2k(path)
 
         self.assertFalse(j.verbose)
 
@@ -976,8 +975,8 @@ class TestJp2k(fixtures.TestCommon):
 
         EXPECTED RESULT:  The default layer property value is 0.
         """
-        with ir.path(data, 'p0_03.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j = Jp2k(path)
 
         self.assertEqual(j.layer, 0)
 


=====================================
tests/test_printing.py
=====================================
@@ -3,7 +3,6 @@
 Test suite for printing.
 """
 # Standard library imports ...
-import importlib.resources as ir
 from io import BytesIO, StringIO
 import struct
 import sys
@@ -23,7 +22,7 @@ from glymur.jp2box import BitsPerComponentBox, ColourSpecificationBox
 from glymur.jp2box import LabelBox
 from glymur import Jp2k, command_line
 from glymur.lib import openjp2 as opj2
-from . import fixtures, data
+from . import fixtures
 from .fixtures import OPENJPEG_NOT_AVAILABLE, OPENJPEG_NOT_AVAILABLE_MSG
 
 
@@ -57,10 +56,10 @@ class TestPrinting(fixtures.TestCommon):
         """
         Invalid channel type should not prevent printing.
         """
-        with ir.path(data, 'issue392.jp2') as path:
-            with warnings.catch_warnings():
-                warnings.simplefilter('ignore')
-                str(Jp2k(path))
+        path = fixtures._path_to('issue392.jp2')
+        with warnings.catch_warnings():
+            warnings.simplefilter('ignore')
+            str(Jp2k(path))
 
     def test_palette(self):
         """
@@ -1296,10 +1295,11 @@ class TestPrinting(fixtures.TestCommon):
 
         EXPECTED RESULT:  validate the string representation
         """
-        with ir.path(data, 'text_GBR.jp2') as path:
-            with self.assertWarns(UserWarning):
-                # The brand is wrong, this is JPX, not JP2.
-                j = Jp2k(path)
+        path = fixtures._path_to('text_GBR.jp2')
+        with self.assertWarns(UserWarning):
+            # The brand is wrong, this is JPX, not JP2.
+            j = Jp2k(path)
+
         box = j.box[3].box[1]
         actual = str(box)
         # Don't bother verifying the OrderedDict part of the colr box.
@@ -1506,27 +1506,27 @@ class TestPrinting(fixtures.TestCommon):
 
         EXPECTED RESULT:  validate the string representation
         """
-        with ir.path(data, 'p0_02.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_02.j2k')
+        j = Jp2k(path)
         actual = str(j.codestream.segment[6])
         expected = '0xff30 marker segment @ (132, 0)'
         self.assertEqual(actual, expected)
 
     def test_scalar_implicit_quantization_file(self):
-        with ir.path(data, 'p0_03.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_03.j2k')
+        j = Jp2k(path)
         actual = str(j.codestream.segment[3])
         self.assertIn('scalar implicit', actual)
 
     def test_scalar_explicit_quantization_file(self):
-        with ir.path(data, 'p0_06.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p0_06.j2k')
+        j = Jp2k(path)
         actual = str(j.codestream.segment[3])
         self.assertIn('scalar explicit', actual)
 
     def test_non_default_precinct_size(self):
-        with ir.path(data, 'p1_07.j2k') as path:
-            j = Jp2k(path)
+        path = fixtures._path_to('p1_07.j2k')
+        j = Jp2k(path)
         actual = str(j.codestream.segment[3])
         expected = fixtures.P1_07
         self.assertEqual(actual, expected)
@@ -1653,8 +1653,8 @@ class TestJp2dump(unittest.TestCase):
         EXPECTED RESULT:  The warning is suppressed until the very end of the
         output.
         """
-        with ir.path(data, 'edf_c2_1178956.jp2') as path:
-            actual = self.run_jp2dump(['', '-x', str(path)])
+        path = fixtures._path_to('edf_c2_1178956.jp2')
+        actual = self.run_jp2dump(['', '-x', str(path)])
         lines = actual.splitlines()
 
         for line in lines[:-1]:


=====================================
tests/test_set_decoded_components.py
=====================================
@@ -1,5 +1,4 @@
 # standard library imports
-import importlib.resources as ir
 import pathlib
 import shutil
 import tempfile
@@ -11,6 +10,7 @@ import numpy as np
 # local imports
 import glymur
 from glymur import Jp2k
+from . import fixtures
 from .fixtures import OPENJPEG_NOT_AVAILABLE, OPENJPEG_NOT_AVAILABLE_MSG
 
 
@@ -180,19 +180,19 @@ class TestSuite(unittest.TestCase):
         setting decoded_components would require us to use the read_bands
         method.
         """
-        with ir.path('tests.data', 'p0_06.j2k') as path:
-            j2k = Jp2k(path)
+        path = fixtures._path_to('p0_06.j2k')
+        j2k = Jp2k(path)
 
-            expected = j2k.read_bands()[0]
+        expected = j2k.read_bands()[0]
 
-            j2k.decoded_components = 0
-            actual = j2k[:]
+        j2k.decoded_components = 0
+        actual = j2k[:]
 
-            np.testing.assert_array_equal(actual, expected)
+        np.testing.assert_array_equal(actual, expected)
 
         # verify that without using decoded components, we cannot read the
         # image using the slice protocol
-        with ir.path('tests.data', 'p0_06.j2k') as path:
-            j2k = Jp2k(path)
-            with self.assertRaises(RuntimeError):
-                j2k[:, :, 0]
+        path = fixtures._path_to('p0_06.j2k')
+        j2k = Jp2k(path)
+        with self.assertRaises(RuntimeError):
+            j2k[:, :, 0]


=====================================
tests/test_tiff2jp2.py
=====================================
@@ -1,5 +1,4 @@
 # standard library imports
-import importlib.resources as ir
 import logging
 import pathlib
 import platform
@@ -1420,10 +1419,10 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
             f.write(buffer)
 
             # XMP
-            with ir.path('tests.data', 'issue555.xmp') as xmp_path:
-                with xmp_path.open() as f2:
-                    xmp = f2.read()
-                    xmp = xmp + '\0'
+            xmp_path = fixtures._path_to('issue555.xmp')
+            with xmp_path.open() as f2:
+                xmp = f2.read()
+                xmp = xmp + '\0'
             buffer = struct.pack(
                 '<HHII', 700, 1, len(xmp), main_ifd_data_offset + 32
             )
@@ -1948,25 +1947,25 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         ColourSpecificationBox.  There is a logging message at the info
         level stating that a color profile was consumed.
         """
-        with ir.path('tests.data', 'basn6a08.tif') as path:
+        path = fixtures._path_to('basn6a08.tif')
 
-            with path.open(mode='rb') as f:
-                buffer = f.read()
-                ifd = glymur._tiff.tiff_header(buffer)
-            icc_profile = bytes(ifd['ICCProfile'])
+        with path.open(mode='rb') as f:
+            buffer = f.read()
+            ifd = glymur._tiff.tiff_header(buffer)
+        icc_profile = bytes(ifd['ICCProfile'])
 
-            with Tiff2Jp2k(
-                path, self.temp_jp2_filename, include_icc_profile=True
-            ) as p:
+        with Tiff2Jp2k(
+            path, self.temp_jp2_filename, include_icc_profile=True
+        ) as p:
 
-                with self.assertLogs(
-                    logger='tiff2jp2', level=logging.INFO
-                ) as cm:
-                    p.run()
+            with self.assertLogs(
+                logger='tiff2jp2', level=logging.INFO
+            ) as cm:
+                p.run()
 
-                self.assertEqual(
-                    sum('ICC profile' in msg for msg in cm.output), 1
-                )
+            self.assertEqual(
+                sum('ICC profile' in msg for msg in cm.output), 1
+            )
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -1981,18 +1980,18 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         Expected Result.  The ICC profile is verified in the
         ColourSpecificationBox.
         """
-        with ir.path('tests.data', 'basn6a08.tif') as path:
+        path = fixtures._path_to('basn6a08.tif')
 
-            with path.open(mode='rb') as f:
-                buffer = f.read()
-                ifd = glymur._tiff.tiff_header(buffer)
-            icc_profile = bytes(ifd['ICCProfile'])
+        with path.open(mode='rb') as f:
+            buffer = f.read()
+            ifd = glymur._tiff.tiff_header(buffer)
+        icc_profile = bytes(ifd['ICCProfile'])
 
-            sys.argv = [
-                '', str(path), str(self.temp_jp2_filename),
-                '--include-icc-profile'
-            ]
-            command_line.tiff2jp2()
+        sys.argv = [
+            '', str(path), str(self.temp_jp2_filename),
+            '--include-icc-profile'
+        ]
+        command_line.tiff2jp2()
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -2008,12 +2007,10 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         profile).  The ICC profile tag will be present in the
         JpgTiffExif->JP2 UUID box.
         """
-        with ir.path('tests.data', 'basn6a08.tif') as path:
+        path = fixtures._path_to('basn6a08.tif')
 
-            sys.argv = [
-                '', str(path), str(self.temp_jp2_filename),
-            ]
-            command_line.tiff2jp2()
+        sys.argv = ['', str(path), str(self.temp_jp2_filename)]
+        command_line.tiff2jp2()
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -2035,13 +2032,13 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         ColourSpecificationBox.  The ICC profile tag will be not present in the
         JpgTiffExif->JP2 UUID box.
         """
-        with ir.path('tests.data', 'basn6a08.tif') as path:
+        path = fixtures._path_to('basn6a08.tif')
 
-            sys.argv = [
-                '', str(path), str(self.temp_jp2_filename),
-                '--exclude-tags', 'ICCProfile',
-            ]
-            command_line.tiff2jp2()
+        sys.argv = [
+            '', str(path), str(self.temp_jp2_filename),
+            '--exclude-tags', 'ICCProfile',
+        ]
+        command_line.tiff2jp2()
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -2064,9 +2061,9 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         Expected Result:  no segfault
         """
         with self.assertRaises(RuntimeError):
-            with ir.path('tests.data', 'simple_rdf.txt') as path:
-                with Tiff2Jp2k(path, self.temp_jp2_filename):
-                    pass
+            path = fixtures._path_to('simple_rdf.txt')
+            with Tiff2Jp2k(path, self.temp_jp2_filename):
+                pass
 
     def test_colormap(self):
         """
@@ -2082,9 +2079,9 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
     def _test_colormap(self, tag):
 
         kwargs = {'tilesize': (32, 32), 'exclude_tags': [tag]}
-        with ir.path('tests.data', 'issue572.tif') as path:
-            with Tiff2Jp2k(path, self.temp_jp2_filename, **kwargs) as p:
-                p.run()
+        path = fixtures._path_to('issue572.tif')
+        with Tiff2Jp2k(path, self.temp_jp2_filename, **kwargs) as p:
+            p.run()
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -2127,11 +2124,9 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         Expected Result:  The UUIDbox has StripOffsets, StripByteCounts, and
         ICCProfile.
         """
-        with ir.path('tests.data', 'basn6a08.tif') as path:
-            with Tiff2Jp2k(
-                path, self.temp_jp2_filename, exclude_tags=None
-            ) as p:
-                p.run()
+        path = fixtures._path_to('basn6a08.tif')
+        with Tiff2Jp2k(path, self.temp_jp2_filename, exclude_tags=None) as p:
+            p.run()
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -2150,9 +2145,9 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         """
         with warnings.catch_warnings():
             warnings.simplefilter('ignore')
-            with ir.path('tests.data', 'albers27.tif') as path:
-                with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
-                    j.run()
+            path = fixtures._path_to('albers27.tif')
+            with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
+                j.run()
 
         j = Jp2k(self.temp_jp2_filename)
 
@@ -2170,13 +2165,11 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         EXPECTED RESULT:  RuntimeError
         """
         with self.assertRaises(RuntimeError):
-            with ir.path(
-                'tests.data', 'flower-separated-planar-08.tif'
-            ) as path:
-                with Tiff2Jp2k(
-                    path, self.temp_jp2_filename, tilesize=(64, 64)
-                ) as j:
-                    j.run()
+            path = fixtures._path_to('flower-separated-planar-08.tif')
+            with Tiff2Jp2k(
+                path, self.temp_jp2_filename, tilesize=(64, 64)
+            ) as j:
+                j.run()
 
     def test_bad_tile_size(self):
         """
@@ -2186,11 +2179,11 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
         EXPECTED RESULT:  RuntimeError
         """
         with self.assertRaises(RuntimeError):
-            with ir.path('tests.data', 'albers27-8.tif') as path:
-                with Tiff2Jp2k(
-                    path, self.temp_jp2_filename, tilesize=(256, 256),
-                ) as j:
-                    j.run()
+            path = fixtures._path_to('albers27-8.tif')
+            with Tiff2Jp2k(
+                path, self.temp_jp2_filename, tilesize=(256, 256),
+            ) as j:
+                j.run()
 
     def test_minisblack_spp1_bigtiff(self):
         """
@@ -2199,9 +2192,9 @@ class TestSuiteNoScikitImage(fixtures.TestCommon):
 
         EXPECTED RESULT:  no errors.
         """
-        with ir.path('tests.data', 'albers27-8.tif') as path:
-            with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
-                j.run()
+        path = fixtures._path_to('albers27-8.tif')
+        with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
+            j.run()
 
     def test_tiff_file_not_there(self):
         """


=====================================
tests/test_warnings.py
=====================================
@@ -3,7 +3,6 @@ Test suite for warnings issued by glymur.
 """
 # Standard library imports
 import codecs
-import importlib.resources as ir
 from io import BytesIO
 import struct
 import unittest
@@ -18,7 +17,7 @@ import glymur
 from glymur.core import COLOR, RED, GREEN, BLUE
 from glymur.jp2box import InvalidJp2kError
 
-from . import fixtures, data
+from . import fixtures
 from .fixtures import OPENJPEG_NOT_AVAILABLE, OPENJPEG_NOT_AVAILABLE_MSG
 
 
@@ -43,10 +42,10 @@ class TestSuite(fixtures.TestCommon):
         EXPECTED RESULT:  A warning is issued.  In this case we also end up
         erroring out anyway since we don't get a valid FileType box.
         """
-        with ir.path(data, 'issue438.jp2') as path:
-            with self.assertWarns(UserWarning):
-                with self.assertRaises(InvalidJp2kError):
-                    Jp2k(path)
+        path = fixtures._path_to('issue438.jp2')
+        with self.assertWarns(UserWarning):
+            with self.assertRaises(InvalidJp2kError):
+                Jp2k(path)
 
     def test_siz_ihdr_mismatch(self):
         """
@@ -456,7 +455,7 @@ class TestSuite(fixtures.TestCommon):
 
     def test_colr_with_cspace_and_icc(self):
         """Colour specification boxes can't have both."""
-        buffer = ir.read_binary(data, 'sgray.icc')
+        buffer = fixtures._read_bytes('sgray.icc')
 
         with self.assertWarns(UserWarning):
             colorspace = glymur.core.SRGB



View it on GitLab: https://salsa.debian.org/debian-gis-team/glymur/-/commit/9d9b0c64b7ad4cc4694c5401b2b339bfe8185b24

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/glymur/-/commit/9d9b0c64b7ad4cc4694c5401b2b339bfe8185b24
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20221203/bd648e23/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list