Bug#1028889: glymur: FTBFS: tests fail
Lucas Nussbaum
lucas at debian.org
Sat Jan 14 12:57:25 GMT 2023
Source: glymur
Version: 0.12.2-2
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20230113 ftbfs-bookworm
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> debian/rules binary
> dh binary --with python3,numpy3 --buildsystem=pybuild
> dh_update_autotools_config -O--buildsystem=pybuild
> dh_autoreconf -O--buildsystem=pybuild
> dh_auto_configure -O--buildsystem=pybuild
> dh_auto_build -O--buildsystem=pybuild
> I: pybuild plugin_pyproject:107: Building wheel for python3.10 with "build" module
> I: pybuild base:240: python3.10 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10
> * Building wheel...
> running bdist_wheel
> running build
> running build_py
> creating build
> creating build/lib
> creating build/lib/glymur
> copying glymur/__init__.py -> build/lib/glymur
> copying glymur/core.py -> build/lib/glymur
> copying glymur/tiff.py -> build/lib/glymur
> copying glymur/options.py -> build/lib/glymur
> copying glymur/command_line.py -> build/lib/glymur
> copying glymur/jp2k.py -> build/lib/glymur
> copying glymur/codestream.py -> build/lib/glymur
> copying glymur/jp2box.py -> build/lib/glymur
> copying glymur/_iccprofile.py -> build/lib/glymur
> copying glymur/config.py -> build/lib/glymur
> copying glymur/version.py -> build/lib/glymur
> creating build/lib/glymur/lib
> copying glymur/lib/__init__.py -> build/lib/glymur/lib
> copying glymur/lib/tiff.py -> build/lib/glymur/lib
> copying glymur/lib/openjp2.py -> build/lib/glymur/lib
> creating build/lib/glymur/data
> copying glymur/data/__init__.py -> build/lib/glymur/data
> running egg_info
> creating Glymur.egg-info
> writing Glymur.egg-info/PKG-INFO
> writing dependency_links to Glymur.egg-info/dependency_links.txt
> writing entry points to Glymur.egg-info/entry_points.txt
> writing requirements to Glymur.egg-info/requires.txt
> writing top-level names to Glymur.egg-info/top_level.txt
> writing manifest file 'Glymur.egg-info/SOURCES.txt'
> reading manifest file 'Glymur.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> no previously-included directories found matching 'build'
> warning: no previously-included files found matching 'readthedocs-pip-requirements.txt'
> warning: no previously-included files found matching 'release.txt'
> adding license file 'LICENSE.txt'
> writing manifest file 'Glymur.egg-info/SOURCES.txt'
> copying glymur/data/nemo.jp2 -> build/lib/glymur/data
> copying glymur/data/heliov.jpx -> build/lib/glymur/data
> copying glymur/data/goodstuff.j2k -> build/lib/glymur/data
> installing to build/bdist.linux-x86_64/wheel
> running install
> running install_lib
> creating build/bdist.linux-x86_64
> creating build/bdist.linux-x86_64/wheel
> creating build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/__init__.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/core.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/tiff.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/options.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/command_line.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/jp2k.py -> build/bdist.linux-x86_64/wheel/glymur
> creating build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/lib/__init__.py -> build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/lib/tiff.py -> build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/lib/openjp2.py -> build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/codestream.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/jp2box.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/_iccprofile.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/config.py -> build/bdist.linux-x86_64/wheel/glymur
> creating build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/__init__.py -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/nemo.jp2 -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/goodstuff.j2k -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/heliov.jpx -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/version.py -> build/bdist.linux-x86_64/wheel/glymur
> running install_egg_info
> Copying Glymur.egg-info to build/bdist.linux-x86_64/wheel/Glymur-0.12.2.egg-info
> running install_scripts
> creating build/bdist.linux-x86_64/wheel/Glymur-0.12.2.dist-info/WHEEL
> creating '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/.tmp-zoqu05fx/Glymur-0.12.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
> adding 'glymur/__init__.py'
> adding 'glymur/_iccprofile.py'
> adding 'glymur/codestream.py'
> adding 'glymur/command_line.py'
> adding 'glymur/config.py'
> adding 'glymur/core.py'
> adding 'glymur/jp2box.py'
> adding 'glymur/jp2k.py'
> adding 'glymur/options.py'
> adding 'glymur/tiff.py'
> adding 'glymur/version.py'
> adding 'glymur/data/__init__.py'
> adding 'glymur/data/goodstuff.j2k'
> adding 'glymur/data/heliov.jpx'
> adding 'glymur/data/nemo.jp2'
> adding 'glymur/lib/__init__.py'
> adding 'glymur/lib/openjp2.py'
> adding 'glymur/lib/tiff.py'
> adding 'Glymur-0.12.2.dist-info/LICENSE.txt'
> adding 'Glymur-0.12.2.dist-info/METADATA'
> adding 'Glymur-0.12.2.dist-info/WHEEL'
> adding 'Glymur-0.12.2.dist-info/entry_points.txt'
> adding 'Glymur-0.12.2.dist-info/top_level.txt'
> adding 'Glymur-0.12.2.dist-info/RECORD'
> removing build/bdist.linux-x86_64/wheel
> Successfully built Glymur-0.12.2-py3-none-any.whl
> I: pybuild plugin_pyproject:119: Unpacking wheel built for python3.10 with "installer" module
> I: pybuild plugin_pyproject:107: Building wheel for python3.11 with "build" module
> I: pybuild base:240: python3.11 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11
> * Building wheel...
> running bdist_wheel
> running build
> running build_py
> running egg_info
> writing Glymur.egg-info/PKG-INFO
> writing dependency_links to Glymur.egg-info/dependency_links.txt
> writing entry points to Glymur.egg-info/entry_points.txt
> writing requirements to Glymur.egg-info/requires.txt
> writing top-level names to Glymur.egg-info/top_level.txt
> reading manifest file 'Glymur.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> no previously-included directories found matching 'build'
> warning: no previously-included files found matching 'readthedocs-pip-requirements.txt'
> warning: no previously-included files found matching 'release.txt'
> adding license file 'LICENSE.txt'
> writing manifest file 'Glymur.egg-info/SOURCES.txt'
> installing to build/bdist.linux-x86_64/wheel
> running install
> running install_lib
> creating build/bdist.linux-x86_64/wheel
> creating build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/__init__.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/core.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/tiff.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/options.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/command_line.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/jp2k.py -> build/bdist.linux-x86_64/wheel/glymur
> creating build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/lib/__init__.py -> build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/lib/tiff.py -> build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/lib/openjp2.py -> build/bdist.linux-x86_64/wheel/glymur/lib
> copying build/lib/glymur/codestream.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/jp2box.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/_iccprofile.py -> build/bdist.linux-x86_64/wheel/glymur
> copying build/lib/glymur/config.py -> build/bdist.linux-x86_64/wheel/glymur
> creating build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/__init__.py -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/nemo.jp2 -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/goodstuff.j2k -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/data/heliov.jpx -> build/bdist.linux-x86_64/wheel/glymur/data
> copying build/lib/glymur/version.py -> build/bdist.linux-x86_64/wheel/glymur
> running install_egg_info
> Copying Glymur.egg-info to build/bdist.linux-x86_64/wheel/Glymur-0.12.2.egg-info
> running install_scripts
> creating build/bdist.linux-x86_64/wheel/Glymur-0.12.2.dist-info/WHEEL
> creating '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/.tmp-8heyw84o/Glymur-0.12.2-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
> adding 'glymur/__init__.py'
> adding 'glymur/_iccprofile.py'
> adding 'glymur/codestream.py'
> adding 'glymur/command_line.py'
> adding 'glymur/config.py'
> adding 'glymur/core.py'
> adding 'glymur/jp2box.py'
> adding 'glymur/jp2k.py'
> adding 'glymur/options.py'
> adding 'glymur/tiff.py'
> adding 'glymur/version.py'
> adding 'glymur/data/__init__.py'
> adding 'glymur/data/goodstuff.j2k'
> adding 'glymur/data/heliov.jpx'
> adding 'glymur/data/nemo.jp2'
> adding 'glymur/lib/__init__.py'
> adding 'glymur/lib/openjp2.py'
> adding 'glymur/lib/tiff.py'
> adding 'Glymur-0.12.2.dist-info/LICENSE.txt'
> adding 'Glymur-0.12.2.dist-info/METADATA'
> adding 'Glymur-0.12.2.dist-info/WHEEL'
> adding 'Glymur-0.12.2.dist-info/entry_points.txt'
> adding 'Glymur-0.12.2.dist-info/top_level.txt'
> adding 'Glymur-0.12.2.dist-info/RECORD'
> removing build/bdist.linux-x86_64/wheel
> Successfully built Glymur-0.12.2-py3-none-any.whl
> I: pybuild plugin_pyproject:119: Unpacking wheel built for python3.11 with "installer" module
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build; python3.10 -m pytest -k 'not test__printing__geotiff_uuid__xml_sidecar and not test_print_bad_geotiff and not test_thread_support' /<<PKGBUILDDIR>>/tests
> ============================= test session starts ==============================
> platform linux -- Python 3.10.9, pytest-7.2.0, pluggy-1.0.0+repack
> rootdir: /<<PKGBUILDDIR>>
> collected 587 items / 5 deselected / 582 selected
>
> ../../../tests/test_callbacks.py .... [ 0%]
> ../../../tests/test_cinema.py .... [ 1%]
> ../../../tests/test_codestream.py .......... [ 3%]
> ../../../tests/test_colour_specification_box.py ........... [ 4%]
> ../../../tests/test_config.py ........... [ 6%]
> ../../../tests/test_jp2box.py .......................................... [ 14%]
> ......................................... [ 21%]
> ../../../tests/test_jp2box_jpx.py ............................ [ 25%]
> ../../../tests/test_jp2box_uuid.py .....s. [ 27%]
> ../../../tests/test_jp2box_xml.py ........ [ 28%]
> ../../../tests/test_jp2k.py ............................................ [ 36%]
> ........................................................................ [ 48%]
> ...... [ 49%]
> ../../../tests/test_libtiff.py s [ 49%]
> ../../../tests/test_openjp2.py ................... [ 52%]
> ../../../tests/test_printing.py ........................................ [ 59%]
> .................................................. [ 68%]
> ../../../tests/test_set_decoded_components.py .......... [ 70%]
> ../../../tests/test_slicing.py ......................................... [ 77%]
> ............. [ 79%]
> ../../../tests/test_threading.py . [ 79%]
> ../../../tests/test_tiff2jp2.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFsFFFFF [ 86%]
> FFFFFFFFFFFF.FFFFFFFFF [ 90%]
> ../../../tests/test_warnings.py ........................................ [ 97%]
> ....... [ 98%]
> ../../../tests/test_writing_tiles.py .......... [100%]
>
> =================================== FAILURES ===================================
> _____________________________ TestSuite.test_32bit _____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_32bit>
>
> def test_32bit(self):
> """
> SCENARIO: The sample format is 32bit integer.
>
> EXPECTED RESULT: RuntimeError
> """
> infile = _file_helper('uint32.tif', module='tests.data.tiff')
> > with Tiff2Jp2k(infile, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:630:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_bad_tile_size _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_bad_tile_size>
>
> def test_bad_tile_size(self):
> """
> SCENARIO: Specify a tilesize that exceeds the image size. This will
> cause a segfault unless caught.
>
> EXPECTED RESULT: RuntimeError
> """
> with self.assertRaises(RuntimeError):
> path = fixtures._path_to('albers27-8.tif')
> > with Tiff2Jp2k(
> path, self.temp_jp2_filename, tilesize=(256, 256),
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1633:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_cmyk ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_cmyk>
>
> def test_cmyk(self):
> """
> Scenario: CMYK (or separated) is not a supported colorspace.
>
> Expected result: RuntimeError
> """
> infile = _file_helper('cmyk.tif', module='tests.data.tiff')
> > with Tiff2Jp2k(infile, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:951:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_codeblock_size _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_codeblock_size>
>
> def test_codeblock_size(self):
> """
> SCENARIO: Convert TIFF file to JP2 with a specific code block size
>
> EXPECTED RESULT: data matches, number of resolution is the default
> """
> cbsize = (32, 32)
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> cbsize=cbsize
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:539:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________________ TestSuite.test_colormap ____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_colormap>
>
> def test_colormap(self):
> """
> Scenario: The input "TIFF" has a colormap tag.
>
> Expected Result: The output JP2 has a single layer and the jp2h box
> has a pclr box.
> """
> for tag in ['ColorMap', 'StripOffsets']:
> with self.subTest(tag=tag):
> > self._test_colormap(tag=tag)
>
> ../../../tests/test_tiff2jp2.py:1527:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../tests/test_tiff2jp2.py:1533: in _test_colormap
> with Tiff2Jp2k(path, self.temp_jp2_filename, **kwargs) as p:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______ TestSuite.test_commandline__capture_display_resolution__tilesize _______
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline__capture_display_resolution__tilesize>
>
> def test_commandline__capture_display_resolution__tilesize(self):
> """
> Scenario: patch sys such that we can run the command line
> tiff2jp2 script. Supply the --tilesize, --capture-resolution
> and --display-resolution arguments.
>
> Expected Result: The last box is a ResolutionBox.
> """
> vresc, hresc = 0.1, 0.2
> vresd, hresd = 0.3, 0.4
>
> sys.argv = [
> '', str(self.exif), str(self.temp_jp2_filename),
> '--tilesize', '64', '64',
> '--capture-resolution', str(vresc), str(hresc),
> '--display-resolution', str(vresd), str(hresd),
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1315:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________ TestSuite.test_commandline_capture_display_resolution _____________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_capture_display_resolution>
>
> def test_commandline_capture_display_resolution(self):
> """
> Scenario: patch sys such that we can run the command
> line tiff2jp2 script. Supply the --capture-resolution and
> --display-resolution arguments.
>
> Expected Result: The last box is a ResolutionBox.
> """
> vresc, hresc = 0.1, 0.2
> vresd, hresd = 0.3, 0.4
>
> sys.argv = [
> '', str(self.exif), str(self.temp_jp2_filename),
> '--capture-resolution', str(vresc), str(hresc),
> '--display-resolution', str(vresd), str(hresd),
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1280:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________ TestSuite.test_commandline_tiff2jp2 ______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2>
>
> def test_commandline_tiff2jp2(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script.
>
> Expected Results: Same as test_astronaut.
> """
> sys.argv = [
> '', str(self.astronaut8), str(self.temp_jp2_filename),
> '--tilesize', '32', '32'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:909:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________ TestSuite.test_commandline_tiff2jp2_exclude_tags _______________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2_exclude_tags>
>
> def test_commandline_tiff2jp2_exclude_tags(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script. Exclude TileByteCounts and TileByteOffsets
>
> Expected Results: TileByteCounts and TileOffsets are not in the EXIF
> UUID.
> """
> sys.argv = [
> '', str(self.astronaut8), str(self.temp_jp2_filename),
> '--tilesize', '32', '32',
> '--exclude-tags', 'tilebytecounts', 'tileoffsets'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:968:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________ TestSuite.test_commandline_tiff2jp2_exclude_tags_numeric ___________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2_exclude_tags_numeric>
>
> def test_commandline_tiff2jp2_exclude_tags_numeric(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script. Exclude TileByteCounts and TileByteOffsets, but provide those
> tags as numeric values.
>
> Expected Results: Same as test_astronaut.
> """
> sys.argv = [
> '', str(self.astronaut8), str(self.temp_jp2_filename),
> '--tilesize', '32', '32',
> '--exclude-tags', '324', '325'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:936:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________ TestSuite.test_commandline_tiff2jp2_xmp_uuid _________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2_xmp_uuid>
>
> def test_commandline_tiff2jp2_xmp_uuid(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script. Use the --create-xmp-uuid option.
>
> Expected Result: An Exif UUID is appended to the end of the
> JP2 file, and then an XMP UUID is appended.
> """
> sys.argv = [
> '', str(self.exif), str(self.temp_jp2_filename),
> '--tilesize', '64', '64',
> '--create-xmp-uuid'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1346:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_eph ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_eph>
>
> def test_eph(self):
> """
> SCENARIO: Convert TIFF file to JP2 with EPH markers.
>
> EXPECTED RESULT: data matches, plt markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename, eph=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:450:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_evenly_tiled __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_evenly_tiled>
>
> def test_evenly_tiled(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:652:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________ TestSuite.test_exclude_icc_profile_commandline ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_icc_profile_commandline>
>
> def test_exclude_icc_profile_commandline(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Do not provide the
> --include-icc-profile flag.
>
> Expected Result. The ColourSpecificationBox is normal (no ICC
> profile). The ICC profile tag will be present in the
> JpgTiffExif->JP2 UUID box.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> sys.argv = ['', str(path), str(self.temp_jp2_filename)]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1463:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______ TestSuite.test_exclude_icc_profile_commandline__exclude_from_uuid _______
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_icc_profile_commandline__exclude_from_uuid>
>
> def test_exclude_icc_profile_commandline__exclude_from_uuid(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Do not specify
> the --include-icc-profile flag. Specify the 34675 (ICCProfile) tag
> in the --exclude-tags flag.
>
> Expected Result. The ICC profile is verified to not be present in the
> ColourSpecificationBox. The ICC profile tag will be not present in the
> JpgTiffExif->JP2 UUID box.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> sys.argv = [
> '', str(path), str(self.temp_jp2_filename),
> '--exclude-tags', 'ICCProfile',
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1491:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_exclude_tags __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_tags>
>
> def test_exclude_tags(self):
> """
> Scenario: Convert TIFF to JP2, but exclude the StripByteCounts and
> StripOffsets tags.
>
> Expected Result: The Exif UUID box prints without error.
> The StripByteCounts and StripOffsets tags are not present.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> exclude_tags=[273, 'stripbytecounts']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1101:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________ TestSuite.test_exclude_tags_but_specify_a_bad_tag _______________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_tags_but_specify_a_bad_tag>
>
> def test_exclude_tags_but_specify_a_bad_tag(self):
> """
> Scenario: Convert TIFF to JP2, but exclude the StripByteCounts and
> StripOffsets tags. In addition, specify a tag that is not recognized.
>
> Expected Result: The results should be the same as the previous
> test except that a warning is issued due to the bad tag.
> """
> with self.assertWarns(UserWarning):
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> exclude_tags=[273, 'stripbytecounts', 'gdalstuff']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1124:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_exclude_tags_camelcase _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_tags_camelcase>
>
> def test_exclude_tags_camelcase(self):
> """
> Scenario: Convert TIFF to JP2, but exclude the StripByteCounts and
> StripOffsets tags. Supply the argments as camel-case.
>
> Expected Result: No warnings, no errors. The Exif LensModel tag is
> recoverable from the UUIDbox.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> exclude_tags=['StripOffsets', 'StripByteCounts']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1144:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________ TestSuite.test_excluded_tags_is_none _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_excluded_tags_is_none>
>
> def test_excluded_tags_is_none(self):
> """
> Scenario: Convert TIFF to JP2, but provide None for the exclude_tags
> argument.
>
> Expected Result: The UUIDbox has StripOffsets, StripByteCounts, and
> ICCProfile.
> """
> path = fixtures._path_to('basn6a08.tif')
> > with Tiff2Jp2k(path, self.temp_jp2_filename, exclude_tags=None) as p:
>
> ../../../tests/test_tiff2jp2.py:1578:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_exif ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exif>
>
> def test_exif(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2
>
> Expected Result: No warnings, no errors. The Exif LensModel tag is
> recoverable from the UUIDbox.
> """
> > with Tiff2Jp2k(self.exif, self.temp_jp2_filename) as p:
>
> ../../../tests/test_tiff2jp2.py:1163:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_floating_point _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_floating_point>
>
> def test_floating_point(self):
> """
> SCENARIO: The sample format is 32bit floating point.
>
> EXPECTED RESULT: RuntimeError
> """
> infile = _file_helper('ieeefp32.tif', module='tests.data.tiff')
> > with Tiff2Jp2k(infile, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:641:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________________ TestSuite.test_geotiff ____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_geotiff>
>
> def test_geotiff(self):
> """
> SCENARIO: Convert a one-component GEOTIFF file to JP2
>
> EXPECTED RESULT: there is a geotiff UUID. The JP2 file has only one
> component.
> """
> with warnings.catch_warnings():
> warnings.simplefilter('ignore')
> path = fixtures._path_to('albers27.tif')
> > with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:1599:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_icc_profile __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_icc_profile>
>
> def test_icc_profile(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Provide the
> include_icc_profile keyword as True.
>
> Expected Result. The ICC profile is verified in the
> ColourSpecificationBox. There is a logging message at the info
> level stating that a color profile was consumed.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> with path.open(mode='rb') as f:
> buffer = f.read()
> ifd = glymur.lib.tiff.tiff_header(buffer)
> icc_profile = bytes(ifd['ICCProfile'])
>
> > with Tiff2Jp2k(
> path, self.temp_jp2_filename, include_icc_profile=True
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1407:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_icc_profile_commandline ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_icc_profile_commandline>
>
> def test_icc_profile_commandline(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Provide the
> --include-icc-profile argument.
>
> Expected Result. The ICC profile is verified in the
> ColourSpecificationBox.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> with path.open(mode='rb') as f:
> buffer = f.read()
> ifd = glymur.lib.tiff.tiff_header(buffer)
> icc_profile = bytes(ifd['ICCProfile'])
>
> sys.argv = [
> '', str(path), str(self.temp_jp2_filename),
> '--include-icc-profile'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1444:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_irreversible __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_irreversible>
>
> def test_irreversible(self):
> """
> SCENARIO: Convert TIFF file to JP2 with the irreversible transform.
>
> EXPECTED RESULT: data matches, the irreversible transform is confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> irreversible=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:394:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________________ TestSuite.test_layers _____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_layers>
>
> def test_layers(self):
> """
> SCENARIO: Convert TIFF file to JP2 with multiple compression layers
>
> EXPECTED RESULT: data matches, number of layers is 3
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> cratios=[200, 50, 10]
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:518:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________ TestSuite.test_minisblack_3strip_to_2x2 ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack_3strip_to_2x2>
>
> def test_minisblack_3strip_to_2x2(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> stripped by 3, but we want 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon_3stripped, self.temp_jp2_filename, tilesize=(48, 48)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:713:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________ TestSuite.test_minisblack_3x3__larger_tilesize_specified ___________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack_3x3__larger_tilesize_specified>
>
> def test_minisblack_3x3__larger_tilesize_specified(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 3x3, but we want 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon_3x3, self.temp_jp2_filename, tilesize=(48, 48)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:736:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________ TestSuite.test_minisblack__smaller_tilesize_specified _____________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack__smaller_tilesize_specified>
>
> def test_minisblack__smaller_tilesize_specified(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 2x2, but we want 4x4.
>
> EXPECTED RESULT: The data matches. The JP2 file has 16 tiles.
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, tilesize=(32, 32)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:690:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_minisblack_spp1_bigtiff ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack_spp1_bigtiff>
>
> def test_minisblack_spp1_bigtiff(self):
> """
> SCENARIO: Convert minisblack BigTIFF file to JP2. The TIFF has tag
> XResolution.
>
> EXPECTED RESULT: no errors.
> """
> path = fixtures._path_to('albers27-8.tif')
> > with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:1646:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________________ TestSuite.test_no_uuid ____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_no_uuid>
>
> def test_no_uuid(self):
> """
> SCENARIO: Convert TIFF file to JP2, but do not include the UUID box
> for the TIFF IFD.
>
> EXPECTED RESULT: data matches, no UUID box
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> create_exif_uuid=False
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:331:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_not_a_tiff ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_not_a_tiff>
>
> def test_not_a_tiff(self):
> """
> Scenario: The input "TIFF" is not actually a TIFF. This used to
> segfault.
>
> Expected Result: no segfault
> """
> with self.assertRaises(RuntimeError):
> path = fixtures._path_to('simple_rdf.txt')
> > with Tiff2Jp2k(path, self.temp_jp2_filename):
>
> ../../../tests/test_tiff2jp2.py:1515:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________ TestSuite.test_numeric_exclude_keyword_argument ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_numeric_exclude_keyword_argument>
>
> def test_numeric_exclude_keyword_argument(self):
> """
> Scenario: specify exclude_tags keyword argument as list of integer
> keyword argument is set to True.
>
> Expected result: The tags are not included in the exif IFD.
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename,
> exclude_tags=[273, 279]
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:983:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________ TestSuite.test_one_component_no_tilesize ___________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_one_component_no_tilesize>
>
> def test_one_component_no_tilesize(self):
> """
> Scenario: The jp2 tilesize is the same as the image size.
>
> Expected Result: No errors.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1368:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________ TestSuite.test_partial_last_strip _______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_partial_last_strip>
>
> def test_partial_last_strip(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF has a
> partial last strip.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon3_partial_last_strip,
> self.temp_jp2_filename,
> tilesize=(48, 48), verbose='DEBUG'
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:602:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________ TestSuite.test_partial_strip_and_partial_tiles ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_partial_strip_and_partial_tiles>
>
> def test_partial_strip_and_partial_tiles(self):
> """
> SCENARIO: Convert monochromatic stripped TIFF file to JP2. The TIFF
> has a partial last strip. The JP2K will have partial tiles.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon3_partial_last_strip, self.temp_jp2_filename,
> tilesize=(48, 48)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:576:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_plt ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_plt>
>
> @unittest.skipIf(
> glymur.version.openjpeg_version < '2.4.0', "Requires as least v2.4.0"
> )
> def test_plt(self):
> """
> SCENARIO: Convert TIFF file to JP2 with PLT markers.
>
> EXPECTED RESULT: data matches, plt markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> plt=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:473:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________________ TestSuite.test_progression_order _______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_progression_order>
>
> def test_progression_order(self):
> """
> SCENARIO: Convert TIFF file to JP2 with EPH markers.
>
> EXPECTED RESULT: data matches, plt markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> prog='rlcp'
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:433:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_psnr ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_psnr>
>
> @unittest.skipIf(
> platform.machine() == 's390x', 'See issue #546'
> )
> def test_psnr(self):
> """
> SCENARIO: Convert TIFF file to JP2 with the irreversible transform.
>
> EXPECTED RESULT: data matches, the irreversible transform is confirmed
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, psnr=(30, 35, 40, 0)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:356:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_resolutions __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_resolutions>
>
> def test_resolutions(self):
> """
> SCENARIO: Convert TIFF file to JP2 with 4 resolution layers instead
> of the default, which is 5.
>
> EXPECTED RESULT: data matches, number of resolution layers is 4.
> """
> expected_numres = 4
>
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> numres=expected_numres
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:497:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_rgb_stripped __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_stripped>
>
> def test_rgb_stripped(self):
> """
> Scenario: input TIFF is evenly divided into strips, but the tile size
> does not evenly divide either dimension.
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1051:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __ TestSuite.test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip ___
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip>
>
> def test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip(self):
> """
> Scenario: input TIFF is evenly divided into strips, but the tile size
> does not evenly divide either dimension. The strip size is 32. The
> tile size is 13x13, so the jp2k tile in tile row 4 and column 0 will
> have it's last row only one pixel past the last row of the tiff tile
> in row 2 and column 0.
>
> Expected Result: no errors
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(75, 75)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1077:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________________ TestSuite.test_rgb_tiled_bigtiff _______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_tiled_bigtiff>
>
> def test_rgb_tiled_bigtiff(self):
> """
> SCENARIO: Convert RGB BigTIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.ycbcr_bg, self.temp_jp2_filename, tilesize=(256, 256),
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:759:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_rgb_tiled_tiff _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_tiled_tiff>
>
> def test_rgb_tiled_tiff(self):
> """
> SCENARIO: Convert RGB TIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.astronaut8, self.temp_jp2_filename, tilesize=(32, 32)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:782:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_rgb_uint16 ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_uint16>
>
> def test_rgb_uint16(self):
> """
> SCENARIO: Convert RGB TIFF file to JP2. The TIFF is evenly
> tiled 2x2 and uint16.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.astronaut_u16, self.temp_jp2_filename, tilesize=(32, 32)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:882:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_separated_configuration ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_separated_configuration>
>
> def test_separated_configuration(self):
> """
> SCENARIO: The TIFF has a planar configuration of SEPARATE which is
> not supported if a tilesize is specified.
>
> EXPECTED RESULT: RuntimeError
> """
> with self.assertRaises(RuntimeError):
> path = fixtures._path_to('flower-separated-planar-08.tif')
> > with Tiff2Jp2k(
> path, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1619:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_smoke _____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_smoke>
>
> def test_smoke(self):
> """
> SCENARIO: Convert TIFF file to JP2
>
> EXPECTED RESULT: data matches, number of resolution is the default.
> There should be just one layer. The number of resolutions should be
> the default (5). There are not PLT segments. There are no EPH
> markers. There are no SOP markers. The progression order is LRCP.
> The irreversible transform will NOT be used. PSNR cannot be tested
> if it is not applied.
>
> There is a UUID box appended at the end containing the metadata.
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:216:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_smoke_rgba ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_smoke_rgba>
>
> def test_smoke_rgba(self):
> """
> SCENARIO: Convert RGBA TIFF file to JP2
>
> EXPECTED RESULT: data matches, number of resolution is the default.
> There should be just one layer. The number of resolutions should be
> the default (5). There are not PLT segments. There are no EPH
> markers. There are no SOP markers. The progression order is LRCP.
> The irreversible transform will NOT be used. PSNR cannot be tested
> if it is not applied.
>
> There is a UUID box appended at the end containing the metadata.
> """
> > with Tiff2Jp2k(
> self.astronaut8_stripped, self.temp_jp2_filename,
> tilesize=[32, 32]
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:276:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_sop ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_sop>
>
> def test_sop(self):
> """
> SCENARIO: Convert TIFF file to JP2 with SOP markers.
>
> EXPECTED RESULT: data matches, sop markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename, sop=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:413:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________ TestSuite.test_string_exclude_keyword_argument ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_string_exclude_keyword_argument>
>
> def test_string_exclude_keyword_argument(self):
> """
> Scenario: specify exclude_tags keyword argument as list of integer
> keyword argument is set to True.
>
> Expected result: The tags are not included in the exif IFD.
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename,
> exclude_tags=['StripOffsets', 'StripByteCounts']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1001:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________________ TestSuite.test_stripped_logging ________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_stripped_logging>
>
> def test_stripped_logging(self):
> """
> Scenario: input TIFF is organized by strips and logging is turned on.
>
> Expected result: there are 104 log messages. These messages come from
> the tiles (a 13x8 grid of tiles).
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(64, 64),
> verbosity=logging.INFO
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1037:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_tiff_has_no_icc_profile ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_tiff_has_no_icc_profile>
>
> def test_tiff_has_no_icc_profile(self):
> """
> Scenario: input TIFF has no ICC profile, yet the include_icc_profile
> keyword argument is set to True.
>
> Expected result: a warning is issued
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(64, 64),
> include_icc_profile=True, verbosity=logging.INFO
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1019:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_tiled_logging _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_tiled_logging>
>
> def test_tiled_logging(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 2x2. Logging is turned on.
>
> EXPECTED RESULT: there are four messages logged, one for each tile
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:675:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________________ TestSuite.test_verbosity ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_verbosity>
>
> def test_verbosity(self):
> """
> SCENARIO: Convert TIFF file to JP2, use INFO log level.
>
> EXPECTED RESULT: data matches
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> verbosity=logging.INFO
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:560:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_xmp ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_xmp>
>
> def test_xmp(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2. The main IFD has an
> XML Packet tag (700). Supply the 'xmp_uuid' keyword as True.
>
> Expected Result: An Exif UUID is appended to the end of the
> JP2 file, and then an XMP UUID is appended. The XMLPacket tag is still
> present in the UUID IFD.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename, create_xmp_uuid=True
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1186:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_xmp__exclude_XMLPacket _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_xmp__exclude_XMLPacket>
>
> def test_xmp__exclude_XMLPacket(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2. The main IFD has an
> XML Packet tag (700). Supply the 'create_xmp_uuid' keyword. Supply
> the exclude_tags keyword, but don't supply XMLPacket.
>
> Expected Result: The XMLPacket tag is not removed from the main IFD.
> An Exif UUID is appended to the end of the JP2 file, and then an XMP
> UUID is appended.
> """
> kwargs = {'create_xmp_uuid': True, 'exclude_tags': ['StripOffsets']}
> > with Tiff2Jp2k(self.exif, self.temp_jp2_filename, **kwargs) as p:
>
> ../../../tests/test_tiff2jp2.py:1245:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________________ TestSuite.test_xmp_false ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_xmp_false>
>
> def test_xmp_false(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2. The main IFD has an
> XML Packet tag (700). Supply the 'xmp_uuid' keyword as False.
>
> Expected Result: An Exif UUID is appended to the end of the
> JP2 file, but no XMP UUID is appended. The XMLPacket tag is still
> present in the UUID data.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename, create_xmp_uuid=False
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1220:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_ycbcr_jpeg_single_tile _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_ycbcr_jpeg_single_tile>
>
> def test_ycbcr_jpeg_single_tile(self):
> """
> SCENARIO: Convert YCBCR/JPEG TIFF file to JP2. The TIFF is evenly
> tiled 2x2, but no tilesize is specified.
>
> EXPECTED RESULT: The data matches.
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:857:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_ycbcr_jpeg_tiff ________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_ycbcr_jpeg_tiff>
>
> def test_ycbcr_jpeg_tiff(self):
> """
> SCENARIO: Convert YCBCR/JPEG TIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> tilesize=(256, 256)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:831:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________ TestSuite.test_ycbcr_jpeg_unevenly_tiled ___________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_ycbcr_jpeg_unevenly_tiled>
>
> def test_ycbcr_jpeg_unevenly_tiled(self):
> """
> SCENARIO: Convert YCBCR/JPEG TIFF file to JP2. The TIFF is evenly
> tiled 2x2. The JPEG 2000 file will be tiled 75x75.
>
> EXPECTED RESULT: The data matches. No errors
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> tilesize=(75, 75)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:805:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f63e9976d40>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> =============================== warnings summary ===============================
> ../../../../../../usr/lib/python3/dist-packages/skimage/util/dtype.py:27
> /usr/lib/python3/dist-packages/skimage/util/dtype.py:27: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`. (Deprecated NumPy 1.24)
> np.bool8: (False, True),
>
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> =========================== short test summary info ============================
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_32bit - AttributeErro...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_bad_tile_size - Attri...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_cmyk - AttributeError...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_codeblock_size - Attr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_colormap - AttributeE...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline__capture_display_resolution__tilesize
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_capture_display_resolution
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2_exclude_tags
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2_exclude_tags_numeric
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2_xmp_uuid
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_eph - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_evenly_tiled - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_icc_profile_commandline
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_icc_profile_commandline__exclude_from_uuid
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_tags - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_tags_but_specify_a_bad_tag
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_tags_camelcase
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_excluded_tags_is_none
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exif - AttributeError...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_floating_point - Attr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_geotiff - AttributeEr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_icc_profile - Attribu...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_icc_profile_commandline
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_irreversible - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_layers - AttributeErr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack_3strip_to_2x2
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack_3x3__larger_tilesize_specified
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack__smaller_tilesize_specified
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack_spp1_bigtiff
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_no_uuid - AttributeEr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_not_a_tiff - Attribut...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_numeric_exclude_keyword_argument
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_one_component_no_tilesize
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_partial_last_strip - ...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_partial_strip_and_partial_tiles
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_plt - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_progression_order - A...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_psnr - AttributeError...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_resolutions - Attribu...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_stripped - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_tiled_bigtiff - A...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_tiled_tiff - Attr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_uint16 - Attribut...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_separated_configuration
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_smoke - AttributeErro...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_smoke_rgba - Attribut...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_sop - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_string_exclude_keyword_argument
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_stripped_logging - At...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_tiff_has_no_icc_profile
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_tiled_logging - Attri...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_verbosity - Attribute...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_xmp - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_xmp__exclude_XMLPacket
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_xmp_false - Attribute...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_ycbcr_jpeg_single_tile
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_ycbcr_jpeg_tiff - Att...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_ycbcr_jpeg_unevenly_tiled
> = 60 failed, 519 passed, 3 skipped, 5 deselected, 1 warning in 65.05s (0:01:05) =
> E: pybuild pybuild:388: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build; python3.10 -m pytest -k 'not test__printing__geotiff_uuid__xml_sidecar and not test_print_bad_geotiff and not test_thread_support' /<<PKGBUILDDIR>>/tests
> I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; python3.11 -m pytest -k 'not test__printing__geotiff_uuid__xml_sidecar and not test_print_bad_geotiff and not test_thread_support' /<<PKGBUILDDIR>>/tests
> ============================= test session starts ==============================
> platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0+repack
> rootdir: /<<PKGBUILDDIR>>
> collected 587 items / 5 deselected / 582 selected
>
> ../../../tests/test_callbacks.py .... [ 0%]
> ../../../tests/test_cinema.py .... [ 1%]
> ../../../tests/test_codestream.py .......... [ 3%]
> ../../../tests/test_colour_specification_box.py ........... [ 4%]
> ../../../tests/test_config.py ........... [ 6%]
> ../../../tests/test_jp2box.py .......................................... [ 14%]
> ......................................... [ 21%]
> ../../../tests/test_jp2box_jpx.py ............................ [ 25%]
> ../../../tests/test_jp2box_uuid.py .....s. [ 27%]
> ../../../tests/test_jp2box_xml.py ........ [ 28%]
> ../../../tests/test_jp2k.py ............................................ [ 36%]
> ........................................................................ [ 48%]
> ...... [ 49%]
> ../../../tests/test_libtiff.py s [ 49%]
> ../../../tests/test_openjp2.py ................... [ 52%]
> ../../../tests/test_printing.py ........................................ [ 59%]
> .................................................. [ 68%]
> ../../../tests/test_set_decoded_components.py .......... [ 70%]
> ../../../tests/test_slicing.py ......................................... [ 77%]
> ............. [ 79%]
> ../../../tests/test_threading.py . [ 79%]
> ../../../tests/test_tiff2jp2.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFsFFFFF [ 86%]
> FFFFFFFFFFFF.FFFFFFFFF [ 90%]
> ../../../tests/test_warnings.py ........................................ [ 97%]
> ....... [ 98%]
> ../../../tests/test_writing_tiles.py .......... [100%]
>
> =================================== FAILURES ===================================
> _____________________________ TestSuite.test_32bit _____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_32bit>
>
> def test_32bit(self):
> """
> SCENARIO: The sample format is 32bit integer.
>
> EXPECTED RESULT: RuntimeError
> """
> infile = _file_helper('uint32.tif', module='tests.data.tiff')
> > with Tiff2Jp2k(infile, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:630:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_bad_tile_size _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_bad_tile_size>
>
> def test_bad_tile_size(self):
> """
> SCENARIO: Specify a tilesize that exceeds the image size. This will
> cause a segfault unless caught.
>
> EXPECTED RESULT: RuntimeError
> """
> with self.assertRaises(RuntimeError):
> path = fixtures._path_to('albers27-8.tif')
> > with Tiff2Jp2k(
> path, self.temp_jp2_filename, tilesize=(256, 256),
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1633:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_cmyk ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_cmyk>
>
> def test_cmyk(self):
> """
> Scenario: CMYK (or separated) is not a supported colorspace.
>
> Expected result: RuntimeError
> """
> infile = _file_helper('cmyk.tif', module='tests.data.tiff')
> > with Tiff2Jp2k(infile, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:951:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_codeblock_size _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_codeblock_size>
>
> def test_codeblock_size(self):
> """
> SCENARIO: Convert TIFF file to JP2 with a specific code block size
>
> EXPECTED RESULT: data matches, number of resolution is the default
> """
> cbsize = (32, 32)
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> cbsize=cbsize
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:539:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________________ TestSuite.test_colormap ____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_colormap>
>
> def test_colormap(self):
> """
> Scenario: The input "TIFF" has a colormap tag.
>
> Expected Result: The output JP2 has a single layer and the jp2h box
> has a pclr box.
> """
> for tag in ['ColorMap', 'StripOffsets']:
> with self.subTest(tag=tag):
> > self._test_colormap(tag=tag)
>
> ../../../tests/test_tiff2jp2.py:1527:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../tests/test_tiff2jp2.py:1533: in _test_colormap
> with Tiff2Jp2k(path, self.temp_jp2_filename, **kwargs) as p:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______ TestSuite.test_commandline__capture_display_resolution__tilesize _______
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline__capture_display_resolution__tilesize>
>
> def test_commandline__capture_display_resolution__tilesize(self):
> """
> Scenario: patch sys such that we can run the command line
> tiff2jp2 script. Supply the --tilesize, --capture-resolution
> and --display-resolution arguments.
>
> Expected Result: The last box is a ResolutionBox.
> """
> vresc, hresc = 0.1, 0.2
> vresd, hresd = 0.3, 0.4
>
> sys.argv = [
> '', str(self.exif), str(self.temp_jp2_filename),
> '--tilesize', '64', '64',
> '--capture-resolution', str(vresc), str(hresc),
> '--display-resolution', str(vresd), str(hresd),
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1315:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________ TestSuite.test_commandline_capture_display_resolution _____________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_capture_display_resolution>
>
> def test_commandline_capture_display_resolution(self):
> """
> Scenario: patch sys such that we can run the command
> line tiff2jp2 script. Supply the --capture-resolution and
> --display-resolution arguments.
>
> Expected Result: The last box is a ResolutionBox.
> """
> vresc, hresc = 0.1, 0.2
> vresd, hresd = 0.3, 0.4
>
> sys.argv = [
> '', str(self.exif), str(self.temp_jp2_filename),
> '--capture-resolution', str(vresc), str(hresc),
> '--display-resolution', str(vresd), str(hresd),
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1280:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________ TestSuite.test_commandline_tiff2jp2 ______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2>
>
> def test_commandline_tiff2jp2(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script.
>
> Expected Results: Same as test_astronaut.
> """
> sys.argv = [
> '', str(self.astronaut8), str(self.temp_jp2_filename),
> '--tilesize', '32', '32'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:909:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________ TestSuite.test_commandline_tiff2jp2_exclude_tags _______________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2_exclude_tags>
>
> def test_commandline_tiff2jp2_exclude_tags(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script. Exclude TileByteCounts and TileByteOffsets
>
> Expected Results: TileByteCounts and TileOffsets are not in the EXIF
> UUID.
> """
> sys.argv = [
> '', str(self.astronaut8), str(self.temp_jp2_filename),
> '--tilesize', '32', '32',
> '--exclude-tags', 'tilebytecounts', 'tileoffsets'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:968:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________ TestSuite.test_commandline_tiff2jp2_exclude_tags_numeric ___________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2_exclude_tags_numeric>
>
> def test_commandline_tiff2jp2_exclude_tags_numeric(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script. Exclude TileByteCounts and TileByteOffsets, but provide those
> tags as numeric values.
>
> Expected Results: Same as test_astronaut.
> """
> sys.argv = [
> '', str(self.astronaut8), str(self.temp_jp2_filename),
> '--tilesize', '32', '32',
> '--exclude-tags', '324', '325'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:936:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________ TestSuite.test_commandline_tiff2jp2_xmp_uuid _________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_commandline_tiff2jp2_xmp_uuid>
>
> def test_commandline_tiff2jp2_xmp_uuid(self):
> """
> Scenario: patch sys such that we can run the command line tiff2jp2
> script. Use the --create-xmp-uuid option.
>
> Expected Result: An Exif UUID is appended to the end of the
> JP2 file, and then an XMP UUID is appended.
> """
> sys.argv = [
> '', str(self.exif), str(self.temp_jp2_filename),
> '--tilesize', '64', '64',
> '--create-xmp-uuid'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1346:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_eph ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_eph>
>
> def test_eph(self):
> """
> SCENARIO: Convert TIFF file to JP2 with EPH markers.
>
> EXPECTED RESULT: data matches, plt markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename, eph=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:450:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_evenly_tiled __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_evenly_tiled>
>
> def test_evenly_tiled(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:652:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________ TestSuite.test_exclude_icc_profile_commandline ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_icc_profile_commandline>
>
> def test_exclude_icc_profile_commandline(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Do not provide the
> --include-icc-profile flag.
>
> Expected Result. The ColourSpecificationBox is normal (no ICC
> profile). The ICC profile tag will be present in the
> JpgTiffExif->JP2 UUID box.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> sys.argv = ['', str(path), str(self.temp_jp2_filename)]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1463:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______ TestSuite.test_exclude_icc_profile_commandline__exclude_from_uuid _______
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_icc_profile_commandline__exclude_from_uuid>
>
> def test_exclude_icc_profile_commandline__exclude_from_uuid(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Do not specify
> the --include-icc-profile flag. Specify the 34675 (ICCProfile) tag
> in the --exclude-tags flag.
>
> Expected Result. The ICC profile is verified to not be present in the
> ColourSpecificationBox. The ICC profile tag will be not present in the
> JpgTiffExif->JP2 UUID box.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> sys.argv = [
> '', str(path), str(self.temp_jp2_filename),
> '--exclude-tags', 'ICCProfile',
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1491:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_exclude_tags __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_tags>
>
> def test_exclude_tags(self):
> """
> Scenario: Convert TIFF to JP2, but exclude the StripByteCounts and
> StripOffsets tags.
>
> Expected Result: The Exif UUID box prints without error.
> The StripByteCounts and StripOffsets tags are not present.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> exclude_tags=[273, 'stripbytecounts']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1101:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________ TestSuite.test_exclude_tags_but_specify_a_bad_tag _______________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_tags_but_specify_a_bad_tag>
>
> def test_exclude_tags_but_specify_a_bad_tag(self):
> """
> Scenario: Convert TIFF to JP2, but exclude the StripByteCounts and
> StripOffsets tags. In addition, specify a tag that is not recognized.
>
> Expected Result: The results should be the same as the previous
> test except that a warning is issued due to the bad tag.
> """
> with self.assertWarns(UserWarning):
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> exclude_tags=[273, 'stripbytecounts', 'gdalstuff']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1124:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_exclude_tags_camelcase _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exclude_tags_camelcase>
>
> def test_exclude_tags_camelcase(self):
> """
> Scenario: Convert TIFF to JP2, but exclude the StripByteCounts and
> StripOffsets tags. Supply the argments as camel-case.
>
> Expected Result: No warnings, no errors. The Exif LensModel tag is
> recoverable from the UUIDbox.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> exclude_tags=['StripOffsets', 'StripByteCounts']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1144:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________ TestSuite.test_excluded_tags_is_none _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_excluded_tags_is_none>
>
> def test_excluded_tags_is_none(self):
> """
> Scenario: Convert TIFF to JP2, but provide None for the exclude_tags
> argument.
>
> Expected Result: The UUIDbox has StripOffsets, StripByteCounts, and
> ICCProfile.
> """
> path = fixtures._path_to('basn6a08.tif')
> > with Tiff2Jp2k(path, self.temp_jp2_filename, exclude_tags=None) as p:
>
> ../../../tests/test_tiff2jp2.py:1578:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_exif ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_exif>
>
> def test_exif(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2
>
> Expected Result: No warnings, no errors. The Exif LensModel tag is
> recoverable from the UUIDbox.
> """
> > with Tiff2Jp2k(self.exif, self.temp_jp2_filename) as p:
>
> ../../../tests/test_tiff2jp2.py:1163:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_floating_point _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_floating_point>
>
> def test_floating_point(self):
> """
> SCENARIO: The sample format is 32bit floating point.
>
> EXPECTED RESULT: RuntimeError
> """
> infile = _file_helper('ieeefp32.tif', module='tests.data.tiff')
> > with Tiff2Jp2k(infile, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:641:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________________ TestSuite.test_geotiff ____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_geotiff>
>
> def test_geotiff(self):
> """
> SCENARIO: Convert a one-component GEOTIFF file to JP2
>
> EXPECTED RESULT: there is a geotiff UUID. The JP2 file has only one
> component.
> """
> with warnings.catch_warnings():
> warnings.simplefilter('ignore')
> path = fixtures._path_to('albers27.tif')
> > with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:1599:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_icc_profile __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_icc_profile>
>
> def test_icc_profile(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Provide the
> include_icc_profile keyword as True.
>
> Expected Result. The ICC profile is verified in the
> ColourSpecificationBox. There is a logging message at the info
> level stating that a color profile was consumed.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> with path.open(mode='rb') as f:
> buffer = f.read()
> ifd = glymur.lib.tiff.tiff_header(buffer)
> icc_profile = bytes(ifd['ICCProfile'])
>
> > with Tiff2Jp2k(
> path, self.temp_jp2_filename, include_icc_profile=True
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1407:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_icc_profile_commandline ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_icc_profile_commandline>
>
> def test_icc_profile_commandline(self):
> """
> Scenario: The input TIFF has the ICC profile tag. Provide the
> --include-icc-profile argument.
>
> Expected Result. The ICC profile is verified in the
> ColourSpecificationBox.
> """
> path = fixtures._path_to('basn6a08.tif')
>
> with path.open(mode='rb') as f:
> buffer = f.read()
> ifd = glymur.lib.tiff.tiff_header(buffer)
> icc_profile = bytes(ifd['ICCProfile'])
>
> sys.argv = [
> '', str(path), str(self.temp_jp2_filename),
> '--include-icc-profile'
> ]
> > command_line.tiff2jp2()
>
> ../../../tests/test_tiff2jp2.py:1444:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/command_line.py:232: in tiff2jp2
> with tiff.Tiff2Jp2k(tiffpath, jp2kpath, **kwargs) as j:
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_irreversible __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_irreversible>
>
> def test_irreversible(self):
> """
> SCENARIO: Convert TIFF file to JP2 with the irreversible transform.
>
> EXPECTED RESULT: data matches, the irreversible transform is confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> irreversible=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:394:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________________ TestSuite.test_layers _____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_layers>
>
> def test_layers(self):
> """
> SCENARIO: Convert TIFF file to JP2 with multiple compression layers
>
> EXPECTED RESULT: data matches, number of layers is 3
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> cratios=[200, 50, 10]
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:518:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________ TestSuite.test_minisblack_3strip_to_2x2 ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack_3strip_to_2x2>
>
> def test_minisblack_3strip_to_2x2(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> stripped by 3, but we want 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon_3stripped, self.temp_jp2_filename, tilesize=(48, 48)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:713:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________ TestSuite.test_minisblack_3x3__larger_tilesize_specified ___________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack_3x3__larger_tilesize_specified>
>
> def test_minisblack_3x3__larger_tilesize_specified(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 3x3, but we want 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon_3x3, self.temp_jp2_filename, tilesize=(48, 48)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:736:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________ TestSuite.test_minisblack__smaller_tilesize_specified _____________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack__smaller_tilesize_specified>
>
> def test_minisblack__smaller_tilesize_specified(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 2x2, but we want 4x4.
>
> EXPECTED RESULT: The data matches. The JP2 file has 16 tiles.
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, tilesize=(32, 32)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:690:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_minisblack_spp1_bigtiff ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_minisblack_spp1_bigtiff>
>
> def test_minisblack_spp1_bigtiff(self):
> """
> SCENARIO: Convert minisblack BigTIFF file to JP2. The TIFF has tag
> XResolution.
>
> EXPECTED RESULT: no errors.
> """
> path = fixtures._path_to('albers27-8.tif')
> > with Tiff2Jp2k(path, self.temp_jp2_filename) as j:
>
> ../../../tests/test_tiff2jp2.py:1646:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________________ TestSuite.test_no_uuid ____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_no_uuid>
>
> def test_no_uuid(self):
> """
> SCENARIO: Convert TIFF file to JP2, but do not include the UUID box
> for the TIFF IFD.
>
> EXPECTED RESULT: data matches, no UUID box
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> create_exif_uuid=False
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:331:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_not_a_tiff ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_not_a_tiff>
>
> def test_not_a_tiff(self):
> """
> Scenario: The input "TIFF" is not actually a TIFF. This used to
> segfault.
>
> Expected Result: no segfault
> """
> with self.assertRaises(RuntimeError):
> path = fixtures._path_to('simple_rdf.txt')
> > with Tiff2Jp2k(path, self.temp_jp2_filename):
>
> ../../../tests/test_tiff2jp2.py:1515:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________ TestSuite.test_numeric_exclude_keyword_argument ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_numeric_exclude_keyword_argument>
>
> def test_numeric_exclude_keyword_argument(self):
> """
> Scenario: specify exclude_tags keyword argument as list of integer
> keyword argument is set to True.
>
> Expected result: The tags are not included in the exif IFD.
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename,
> exclude_tags=[273, 279]
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:983:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________ TestSuite.test_one_component_no_tilesize ___________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_one_component_no_tilesize>
>
> def test_one_component_no_tilesize(self):
> """
> Scenario: The jp2 tilesize is the same as the image size.
>
> Expected Result: No errors.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename,
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1368:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________ TestSuite.test_partial_last_strip _______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_partial_last_strip>
>
> def test_partial_last_strip(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF has a
> partial last strip.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon3_partial_last_strip,
> self.temp_jp2_filename,
> tilesize=(48, 48), verbose='DEBUG'
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:602:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________ TestSuite.test_partial_strip_and_partial_tiles ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_partial_strip_and_partial_tiles>
>
> def test_partial_strip_and_partial_tiles(self):
> """
> SCENARIO: Convert monochromatic stripped TIFF file to JP2. The TIFF
> has a partial last strip. The JP2K will have partial tiles.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.moon3_partial_last_strip, self.temp_jp2_filename,
> tilesize=(48, 48)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:576:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_plt ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_plt>
>
> @unittest.skipIf(
> glymur.version.openjpeg_version < '2.4.0', "Requires as least v2.4.0"
> )
> def test_plt(self):
> """
> SCENARIO: Convert TIFF file to JP2 with PLT markers.
>
> EXPECTED RESULT: data matches, plt markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> plt=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:473:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________________ TestSuite.test_progression_order _______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_progression_order>
>
> def test_progression_order(self):
> """
> SCENARIO: Convert TIFF file to JP2 with EPH markers.
>
> EXPECTED RESULT: data matches, plt markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> prog='rlcp'
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:433:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_psnr ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_psnr>
>
> @unittest.skipIf(
> platform.machine() == 's390x', 'See issue #546'
> )
> def test_psnr(self):
> """
> SCENARIO: Convert TIFF file to JP2 with the irreversible transform.
>
> EXPECTED RESULT: data matches, the irreversible transform is confirmed
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, psnr=(30, 35, 40, 0)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:356:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_resolutions __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_resolutions>
>
> def test_resolutions(self):
> """
> SCENARIO: Convert TIFF file to JP2 with 4 resolution layers instead
> of the default, which is 5.
>
> EXPECTED RESULT: data matches, number of resolution layers is 4.
> """
> expected_numres = 4
>
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> numres=expected_numres
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:497:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_rgb_stripped __________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_stripped>
>
> def test_rgb_stripped(self):
> """
> Scenario: input TIFF is evenly divided into strips, but the tile size
> does not evenly divide either dimension.
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1051:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __ TestSuite.test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip ___
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip>
>
> def test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip(self):
> """
> Scenario: input TIFF is evenly divided into strips, but the tile size
> does not evenly divide either dimension. The strip size is 32. The
> tile size is 13x13, so the jp2k tile in tile row 4 and column 0 will
> have it's last row only one pixel past the last row of the tiff tile
> in row 2 and column 0.
>
> Expected Result: no errors
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(75, 75)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1077:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________________ TestSuite.test_rgb_tiled_bigtiff _______________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_tiled_bigtiff>
>
> def test_rgb_tiled_bigtiff(self):
> """
> SCENARIO: Convert RGB BigTIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.ycbcr_bg, self.temp_jp2_filename, tilesize=(256, 256),
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:759:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_rgb_tiled_tiff _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_tiled_tiff>
>
> def test_rgb_tiled_tiff(self):
> """
> SCENARIO: Convert RGB TIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.astronaut8, self.temp_jp2_filename, tilesize=(32, 32)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:782:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_rgb_uint16 ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_rgb_uint16>
>
> def test_rgb_uint16(self):
> """
> SCENARIO: Convert RGB TIFF file to JP2. The TIFF is evenly
> tiled 2x2 and uint16.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.astronaut_u16, self.temp_jp2_filename, tilesize=(32, 32)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:882:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_separated_configuration ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_separated_configuration>
>
> def test_separated_configuration(self):
> """
> SCENARIO: The TIFF has a planar configuration of SEPARATE which is
> not supported if a tilesize is specified.
>
> EXPECTED RESULT: RuntimeError
> """
> with self.assertRaises(RuntimeError):
> path = fixtures._path_to('flower-separated-planar-08.tif')
> > with Tiff2Jp2k(
> path, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1619:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _____________________________ TestSuite.test_smoke _____________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_smoke>
>
> def test_smoke(self):
> """
> SCENARIO: Convert TIFF file to JP2
>
> EXPECTED RESULT: data matches, number of resolution is the default.
> There should be just one layer. The number of resolutions should be
> the default (5). There are not PLT segments. There are no EPH
> markers. There are no SOP markers. The progression order is LRCP.
> The irreversible transform will NOT be used. PSNR cannot be tested
> if it is not applied.
>
> There is a UUID box appended at the end containing the metadata.
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:216:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> __________________________ TestSuite.test_smoke_rgba ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_smoke_rgba>
>
> def test_smoke_rgba(self):
> """
> SCENARIO: Convert RGBA TIFF file to JP2
>
> EXPECTED RESULT: data matches, number of resolution is the default.
> There should be just one layer. The number of resolutions should be
> the default (5). There are not PLT segments. There are no EPH
> markers. There are no SOP markers. The progression order is LRCP.
> The irreversible transform will NOT be used. PSNR cannot be tested
> if it is not applied.
>
> There is a UUID box appended at the end containing the metadata.
> """
> > with Tiff2Jp2k(
> self.astronaut8_stripped, self.temp_jp2_filename,
> tilesize=[32, 32]
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:276:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_sop ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_sop>
>
> def test_sop(self):
> """
> SCENARIO: Convert TIFF file to JP2 with SOP markers.
>
> EXPECTED RESULT: data matches, sop markers confirmed
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename, sop=True
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:413:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________ TestSuite.test_string_exclude_keyword_argument ________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_string_exclude_keyword_argument>
>
> def test_string_exclude_keyword_argument(self):
> """
> Scenario: specify exclude_tags keyword argument as list of integer
> keyword argument is set to True.
>
> Expected result: The tags are not included in the exif IFD.
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename,
> exclude_tags=['StripOffsets', 'StripByteCounts']
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1001:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _______________________ TestSuite.test_stripped_logging ________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_stripped_logging>
>
> def test_stripped_logging(self):
> """
> Scenario: input TIFF is organized by strips and logging is turned on.
>
> Expected result: there are 104 log messages. These messages come from
> the tiles (a 13x8 grid of tiles).
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(64, 64),
> verbosity=logging.INFO
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1037:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_tiff_has_no_icc_profile ____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_tiff_has_no_icc_profile>
>
> def test_tiff_has_no_icc_profile(self):
> """
> Scenario: input TIFF has no ICC profile, yet the include_icc_profile
> keyword argument is set to True.
>
> Expected result: a warning is issued
> """
> > with Tiff2Jp2k(
> self.stripped, self.temp_jp2_filename, tilesize=(64, 64),
> include_icc_profile=True, verbosity=logging.INFO
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:1019:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> _________________________ TestSuite.test_tiled_logging _________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_tiled_logging>
>
> def test_tiled_logging(self):
> """
> SCENARIO: Convert monochromatic TIFF file to JP2. The TIFF is evenly
> tiled 2x2. Logging is turned on.
>
> EXPECTED RESULT: there are four messages logged, one for each tile
> """
> > with Tiff2Jp2k(
> self.moon, self.temp_jp2_filename, tilesize=(64, 64)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:675:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________________ TestSuite.test_verbosity ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_verbosity>
>
> def test_verbosity(self):
> """
> SCENARIO: Convert TIFF file to JP2, use INFO log level.
>
> EXPECTED RESULT: data matches
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> verbosity=logging.INFO
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:560:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ______________________________ TestSuite.test_xmp ______________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_xmp>
>
> def test_xmp(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2. The main IFD has an
> XML Packet tag (700). Supply the 'xmp_uuid' keyword as True.
>
> Expected Result: An Exif UUID is appended to the end of the
> JP2 file, and then an XMP UUID is appended. The XMLPacket tag is still
> present in the UUID IFD.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename, create_xmp_uuid=True
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1186:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_xmp__exclude_XMLPacket _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_xmp__exclude_XMLPacket>
>
> def test_xmp__exclude_XMLPacket(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2. The main IFD has an
> XML Packet tag (700). Supply the 'create_xmp_uuid' keyword. Supply
> the exclude_tags keyword, but don't supply XMLPacket.
>
> Expected Result: The XMLPacket tag is not removed from the main IFD.
> An Exif UUID is appended to the end of the JP2 file, and then an XMP
> UUID is appended.
> """
> kwargs = {'create_xmp_uuid': True, 'exclude_tags': ['StripOffsets']}
> > with Tiff2Jp2k(self.exif, self.temp_jp2_filename, **kwargs) as p:
>
> ../../../tests/test_tiff2jp2.py:1245:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________________ TestSuite.test_xmp_false ___________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_xmp_false>
>
> def test_xmp_false(self):
> """
> Scenario: Convert TIFF with Exif IFD to JP2. The main IFD has an
> XML Packet tag (700). Supply the 'xmp_uuid' keyword as False.
>
> Expected Result: An Exif UUID is appended to the end of the
> JP2 file, but no XMP UUID is appended. The XMLPacket tag is still
> present in the UUID data.
> """
> > with Tiff2Jp2k(
> self.exif, self.temp_jp2_filename, create_xmp_uuid=False
> ) as p:
>
> ../../../tests/test_tiff2jp2.py:1220:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ____________________ TestSuite.test_ycbcr_jpeg_single_tile _____________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_ycbcr_jpeg_single_tile>
>
> def test_ycbcr_jpeg_single_tile(self):
> """
> SCENARIO: Convert YCBCR/JPEG TIFF file to JP2. The TIFF is evenly
> tiled 2x2, but no tilesize is specified.
>
> EXPECTED RESULT: The data matches.
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:857:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ________________________ TestSuite.test_ycbcr_jpeg_tiff ________________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_ycbcr_jpeg_tiff>
>
> def test_ycbcr_jpeg_tiff(self):
> """
> SCENARIO: Convert YCBCR/JPEG TIFF file to JP2. The TIFF is evenly
> tiled 2x2.
>
> EXPECTED RESULT: The data matches. The JP2 file has 4 tiles.
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> tilesize=(256, 256)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:831:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> ___________________ TestSuite.test_ycbcr_jpeg_unevenly_tiled ___________________
>
> self = <tests.test_tiff2jp2.TestSuite testMethod=test_ycbcr_jpeg_unevenly_tiled>
>
> def test_ycbcr_jpeg_unevenly_tiled(self):
> """
> SCENARIO: Convert YCBCR/JPEG TIFF file to JP2. The TIFF is evenly
> tiled 2x2. The JPEG 2000 file will be tiled 75x75.
>
> EXPECTED RESULT: The data matches. No errors
> """
> > with Tiff2Jp2k(
> self.astronaut_ycbcr_jpeg_tiled, self.temp_jp2_filename,
> tilesize=(75, 75)
> ) as j:
>
> ../../../tests/test_tiff2jp2.py:805:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ../../../glymur/tiff.py:178: in __enter__
> self.tiff_fp = libtiff.open(self.tiff_filename)
> ../../../glymur/lib/tiff.py:581: in open
> err_handler, warn_handler = _set_error_warning_handlers()
> ../../../glymur/lib/tiff.py:232: in _set_error_warning_handlers
> old_warning_handler = setWarningHandler()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <CFunctionType object at 0x7f12e6ed9230>
>
> def setWarningHandler(func=_WARNING_HANDLER):
> # The signature of the warning handler is
> # const char *module, const char *fmt, va_list ap
> #
> # The return type is void *
> > _LIBTIFF.TIFFSetWarningHandler.argtypes = [_WFUNCTYPE]
> E AttributeError: 'NoneType' object has no attribute 'TIFFSetWarningHandler'
>
> ../../../glymur/lib/tiff.py:633: AttributeError
> =============================== warnings summary ===============================
> ../../../../../../usr/lib/python3/dist-packages/skimage/util/dtype.py:27
> /usr/lib/python3/dist-packages/skimage/util/dtype.py:27: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`. (Deprecated NumPy 1.24)
> np.bool8: (False, True),
>
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> =========================== short test summary info ============================
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_32bit - AttributeErro...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_bad_tile_size - Attri...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_cmyk - AttributeError...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_codeblock_size - Attr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_colormap - AttributeE...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline__capture_display_resolution__tilesize
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_capture_display_resolution
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2_exclude_tags
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2_exclude_tags_numeric
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_commandline_tiff2jp2_xmp_uuid
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_eph - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_evenly_tiled - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_icc_profile_commandline
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_icc_profile_commandline__exclude_from_uuid
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_tags - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_tags_but_specify_a_bad_tag
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exclude_tags_camelcase
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_excluded_tags_is_none
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_exif - AttributeError...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_floating_point - Attr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_geotiff - AttributeEr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_icc_profile - Attribu...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_icc_profile_commandline
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_irreversible - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_layers - AttributeErr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack_3strip_to_2x2
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack_3x3__larger_tilesize_specified
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack__smaller_tilesize_specified
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_minisblack_spp1_bigtiff
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_no_uuid - AttributeEr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_not_a_tiff - Attribut...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_numeric_exclude_keyword_argument
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_one_component_no_tilesize
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_partial_last_strip - ...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_partial_strip_and_partial_tiles
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_plt - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_progression_order - A...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_psnr - AttributeError...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_resolutions - Attribu...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_stripped - Attrib...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_tiled_bigtiff - A...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_tiled_tiff - Attr...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_rgb_uint16 - Attribut...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_separated_configuration
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_smoke - AttributeErro...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_smoke_rgba - Attribut...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_sop - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_string_exclude_keyword_argument
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_stripped_logging - At...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_tiff_has_no_icc_profile
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_tiled_logging - Attri...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_verbosity - Attribute...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_xmp - AttributeError:...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_xmp__exclude_XMLPacket
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_xmp_false - Attribute...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_ycbcr_jpeg_single_tile
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_ycbcr_jpeg_tiff - Att...
> FAILED ../../../tests/test_tiff2jp2.py::TestSuite::test_ycbcr_jpeg_unevenly_tiled
> = 60 failed, 519 passed, 3 skipped, 5 deselected, 1 warning in 63.01s (0:01:03) =
> E: pybuild pybuild:388: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; python3.11 -m pytest -k 'not test__printing__geotiff_uuid__xml_sidecar and not test_print_bad_geotiff and not test_thread_support' /<<PKGBUILDDIR>>/tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.11" returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2023/01/13/glymur_0.12.2-2_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230113;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230113&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
More information about the Pkg-grass-devel
mailing list