Blame tests/bugfixes/redmine/test_issue_831.py

Packit Service 21b5d1
# -*- coding: utf-8 -*-
Packit Service 21b5d1
Packit Service 21b5d1
from system_tests import CaseMeta, CopyFiles, path
Packit Service 21b5d1
Packit Service 21b5d1
Packit Service 21b5d1
@CopyFiles("$data_path/mini9.tif")
Packit Service 21b5d1
class UseNonIntrusiveWriting(metaclass=CaseMeta):
Packit Service 21b5d1
Packit Service 21b5d1
    url = "http://dev.exiv2.org/issues/831"
Packit Service 21b5d1
Packit Service 21b5d1
    filename = path("$data_path/mini9_copy.tif")
Packit Service 21b5d1
Packit Service 21b5d1
    commands = [
Packit Service 21b5d1
        """$exiv2 -v -Qd -M"set Exif.Image.ImageDescription Just GIMP" $filename""",
Packit Service 21b5d1
        "$exiv2 -v -pa $filename"
Packit Service 21b5d1
    ]
Packit Service 21b5d1
Packit Service 21b5d1
    stdout = [
Packit Service 21b5d1
        """File 1/1: $filename
Packit Service 21b5d1
Set Exif.Image.ImageDescription "Just GIMP" (Ascii)
Packit Service 21b5d1
""",
Packit Service 21b5d1
        """File 1/1: $filename
Packit Service 21b5d1
Exif.Image.NewSubfileType                    Long        1  Primary image
Packit Service 21b5d1
Exif.Image.ImageWidth                        Short       1  9
Packit Service 21b5d1
Exif.Image.ImageLength                       Short       1  9
Packit Service 21b5d1
Exif.Image.BitsPerSample                     Short       3  8 8 8
Packit Service 21b5d1
Exif.Image.Compression                       Short       1  Uncompressed
Packit Service 21b5d1
Exif.Image.PhotometricInterpretation         Short       1  RGB
Packit Service 21b5d1
Exif.Image.DocumentName                      Ascii      24  /home/ahuggel/mini9.tif
Packit Service 21b5d1
Exif.Image.ImageDescription                  Ascii      10  Just GIMP
Packit Service 21b5d1
Exif.Image.StripOffsets                      Long        1  8
Packit Service 21b5d1
Exif.Image.Orientation                       Short       1  top, left
Packit Service 21b5d1
Exif.Image.SamplesPerPixel                   Short       1  3
Packit Service 21b5d1
Exif.Image.RowsPerStrip                      Short       1  64
Packit Service 21b5d1
Exif.Image.StripByteCounts                   Long        1  243
Packit Service 21b5d1
Exif.Image.XResolution                       Rational    1  72
Packit Service 21b5d1
Exif.Image.YResolution                       Rational    1  72
Packit Service 21b5d1
Exif.Image.PlanarConfiguration               Short       1  1
Packit Service 21b5d1
Exif.Image.ResolutionUnit                    Short       1  inch
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
    stderr = [
Packit Service 21b5d1
        """Info: Write strategy: Non-intrusive
Packit Service 21b5d1
""",
Packit Service 21b5d1
        """$filename: No IPTC data found in the file
Packit Service 21b5d1
$filename: No XMP data found in the file
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
    retval = [0] * 2