Blame tests/bugfixes/redmine/test_issue_1137.py

Packit Service 21b5d1
# -*- coding: utf-8 -*-
Packit Service 21b5d1
Packit Service 21b5d1
import system_tests
Packit Service 21b5d1
Packit Service 21b5d1
Packit Service 21b5d1
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
Packit Service 21b5d1
class MetadataPiping(metaclass=system_tests.CaseMeta):
Packit Service 21b5d1
Packit Service 21b5d1
    url = "http://dev.exiv2.org/issues/1137"
Packit Service 21b5d1
Packit Service 21b5d1
    filename = system_tests.path("$data_path/exiv2-empty_copy.jpg")
Packit Service 21b5d1
    Stonehenge = system_tests.path("$data_path/Stonehenge.exv")
Packit Service 21b5d1
Packit Service 21b5d1
    commands = [
Packit Service 21b5d1
        """$exiv2 -pa                   $filename""",
Packit Service 21b5d1
        """$exiv2 -PkV --grep GPSL      $Stonehenge""",
Packit Service 21b5d1
        """$exiv2 -m- $filename""",
Packit Service 21b5d1
        """$exiv2 -pa  --grep GPSL      $filename"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
Packit Service 21b5d1
    output_grep_GPSL = """set Exif.GPSInfo.GPSLatitudeRef                   N
Packit Service 21b5d1
set Exif.GPSInfo.GPSLatitude                      51/1 106969/10000 0/1
Packit Service 21b5d1
set Exif.GPSInfo.GPSLongitudeRef                  W
Packit Service 21b5d1
set Exif.GPSInfo.GPSLongitude                     1/1 495984/10000 0/1
Packit Service 21b5d1
"""
Packit Service 21b5d1
Packit Service 21b5d1
    stdin = [
Packit Service 21b5d1
        None,
Packit Service 21b5d1
        None,
Packit Service 21b5d1
        output_grep_GPSL,
Packit Service 21b5d1
        None
Packit Service 21b5d1
    ]
Packit Service 21b5d1
Packit Service 21b5d1
    stdout = [
Packit Service 21b5d1
        "",
Packit Service 21b5d1
        output_grep_GPSL,
Packit Service 21b5d1
        "",
Packit Service 21b5d1
        """Exif.GPSInfo.GPSLatitudeRef                  Ascii       2  North
Packit Service 21b5d1
Exif.GPSInfo.GPSLatitude                     Rational    3  51deg 10.69690' 
Packit Service 21b5d1
Exif.GPSInfo.GPSLongitudeRef                 Ascii       2  West
Packit Service 21b5d1
Exif.GPSInfo.GPSLongitude                    Rational    3  1deg 49.59840' 
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]