Blame tests/bugfixes/redmine/test_issue_855.py

Packit Service 21b5d1
# -*- coding: utf-8 -*-
Packit Service 21b5d1
Packit Service 21b5d1
from system_tests import CaseMeta, path
Packit Service 21b5d1
Packit Service 21b5d1
Packit Service 21b5d1
class DontSegfaultWhenAccessingFocalLength(metaclass=CaseMeta):
Packit Service 21b5d1
Packit Service 21b5d1
    url = "http://dev.exiv2.org/issues/855"
Packit Service 21b5d1
Packit Service 21b5d1
    filename = path("$data_path/exiv2-bug855.jpg")
Packit Service 21b5d1
Packit Service 21b5d1
    commands = ["$exiv2 -pa $filename"]
Packit Service 21b5d1
Packit Service 21b5d1
    stdout = ["""Exif.Image.NewSubfileType                    Long        1  Thumbnail/Preview image
Packit Service 21b5d1
Exif.Image.Make                              Ascii      20  PENTAX             
Packit Service 21b5d1
Exif.Image.Model                             Ascii      20  PENTAX K-x         
Packit Service 21b5d1
Exif.Image.Orientation                       Short       1  top, left
Packit Service 21b5d1
Exif.Image.Software                          Ascii      16  darktable 0.9.3
Packit Service 21b5d1
Exif.Image.DateTime                          Ascii      20  2012:01:22 01:54:26
Packit Service 21b5d1
Exif.Image.Artist                            Ascii      17  SEBASTIAN WAGNER
Packit Service 21b5d1
Exif.Image.Rating                            SLong       1  1
Packit Service 21b5d1
Exif.Image.RatingPercent                     SLong       1  20
Packit Service 21b5d1
Exif.Image.Copyright                         Ascii      33  CREATIVECOMMONS ATTRIBUTION CCBY
Packit Service 21b5d1
Exif.Image.ExifTag                           Long        1  666
Packit Service 21b5d1
Exif.Photo.ExposureTime                      Rational    1  1/20 s
Packit Service 21b5d1
Exif.Photo.FNumber                           Rational    1  F5.6
Packit Service 21b5d1
Exif.Photo.ExposureProgram                   Short       1  Landscape mode
Packit Service 21b5d1
Exif.Photo.ISOSpeedRatings                   Short       1  2500
Packit Service 21b5d1
Exif.Photo.DateTimeOriginal                  Ascii      20  2012:01:22 01:54:26
Packit Service 21b5d1
Exif.Photo.DateTimeDigitized                 Ascii      20  2012:01:22 01:54:26
Packit Service 21b5d1
Exif.Photo.ExposureBiasValue                 SRational   1  0 EV
Packit Service 21b5d1
Exif.Photo.MeteringMode                      Short       1  Multi-segment
Packit Service 21b5d1
Exif.Photo.Flash                             Short       1  No, compulsory
Packit Service 21b5d1
Exif.Photo.FocalLength                       Rational    0  
Packit Service 21b5d1
Exif.Photo.ColorSpace                        Short       1  sRGB
Packit Service 21b5d1
Exif.Photo.SensingMethod                     Short       1  One-chip color area
Packit Service 21b5d1
Exif.Photo.CustomRendered                    Short       1  Normal process
Packit Service 21b5d1
Exif.Photo.ExposureMode                      Short       1  Auto
Packit Service 21b5d1
Exif.Photo.WhiteBalance                      Short       1  Auto
Packit Service 21b5d1
Exif.Photo.FocalLengthIn35mmFilm             Short       1  82.0 mm
Packit Service 21b5d1
Exif.Photo.SceneCaptureType                  Short       1  Landscape
Packit Service 21b5d1
Exif.Photo.Contrast                          Short       1  Hard
Packit Service 21b5d1
Exif.Photo.Saturation                        Short       1  Normal
Packit Service 21b5d1
Exif.Photo.Sharpness                         Short       1  Hard
Packit Service 21b5d1
Exif.Photo.SubjectDistanceRange              Short       1  Macro
Packit Service 21b5d1
Exif.Image.DNGVersion                        Byte        4  1 1 0 0
Packit Service 21b5d1
Exif.Image.DNGBackwardVersion                Byte        4  1 1 0 0
Packit Service 21b5d1
Exif.Image.UniqueCameraModel                 Ascii      11  PENTAX K-x
Packit Service 21b5d1
Exif.Image.ColorMatrix1                      SRational   9  71147/65536 -36788/65536 223/65536 -28867/65536 69463/65536 28977/65536 -1276/65536 2064/65536 45215/65536
Packit Service 21b5d1
Exif.Image.ColorMatrix2                      SRational   9  68429/65536 -21793/65536 -7522/65536 -36512/65536 89125/65536 14083/65536 -7905/65536 11496/65536 48817/65536
Packit Service 21b5d1
Exif.Image.AnalogBalance                     Rational    3  1/1 1/1 1/1
Packit Service 21b5d1
Exif.Image.AsShotNeutral                     Rational    3  256/352 256/264 256/762
Packit Service 21b5d1
Exif.Image.BaselineExposure                  SRational   1  -31775/65536
Packit Service 21b5d1
Exif.Image.BaselineNoise                     Rational    1  1/1
Packit Service 21b5d1
Exif.Image.BaselineSharpness                 Rational    1  1/1
Packit Service 21b5d1
Exif.Image.LinearResponseLimit               Rational    1  1/1
Packit Service 21b5d1
Exif.Image.CalibrationIlluminant1            Short       1  17
Packit Service 21b5d1
Exif.Image.CalibrationIlluminant2            Short       1  21
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
    stderr = [
Packit Service 21b5d1
        """Error: Upper boundary of data for directory Photo, entry 0x920a is out of bounds: Offset = 0x000003dc, size = 8, exceeds buffer size by 6 Bytes; truncating the entry
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
    retval = [0]