Port redmine issues 1179-1305
- Authorship: Luis Díaz Más & Dan Čermák
This commit is contained in:
parent
b3265c21e0
commit
5bd26ee82b
233
tests/bugfixes/redmine/test_issue_1179.py
Normal file
233
tests/bugfixes/redmine/test_issue_1179.py
Normal file
@ -0,0 +1,233 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import itertools
|
||||
import system_tests
|
||||
|
||||
def char_range(c1, c2):
|
||||
"""Generates the characters from `c1` to `c2`, inclusive."""
|
||||
for c in range(ord(c1), ord(c2)+1):
|
||||
yield chr(c)
|
||||
|
||||
ORIGINAL_FILES = ["$data_path/exiv2-bug1179" + case + ".exv"
|
||||
for case in char_range('a', 'j')]
|
||||
|
||||
def make_command(filename):
|
||||
return ["$exiv2 -pa --grep fuji/i " + filename]
|
||||
|
||||
|
||||
class CheckFilmMode(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1179"
|
||||
|
||||
commands = list(itertools.chain.from_iterable(
|
||||
make_command(fname) for fname in ORIGINAL_FILES))
|
||||
|
||||
stdout = [
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 Normal
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Auto
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 Off
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.FilmMode Short 1 F0/Standard (Provia)
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 Normal
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Auto
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 Off
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.FilmMode Short 1 F2/Fujichrome (Velvia)
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""", #b
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 Normal
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Auto
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 Off
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.FilmMode Short 1 F1b/Studio Portrait Smooth Skin Tone (Astia)
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 Normal
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Auto
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 Off
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.FilmMode Short 1 Classic Chrome
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 Normal
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Auto
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 Off
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.FilmMode Short 1 Pro Neg. Hi
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 None (black & white)
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Manual
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 On
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 On
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 (770)
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Manual
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Program AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 On
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 On
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 (769)
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Manual
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Shutter speed priority AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 On
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 (771)
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Manual
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Shutter speed priority AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 On
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
""",
|
||||
"""Exif.Fujifilm.Version Undefined 4 48 49 51 48
|
||||
Exif.Fujifilm.SerialNumber Ascii 48 FFDT22794526 593332303134151113535030217060
|
||||
Exif.Fujifilm.Quality Ascii 8 NORMAL
|
||||
Exif.Fujifilm.Sharpness Short 1 Normal
|
||||
Exif.Fujifilm.WhiteBalance Short 1 Auto
|
||||
Exif.Fujifilm.Color Short 1 (784)
|
||||
Exif.Fujifilm.FlashMode Short 1 Off
|
||||
Exif.Fujifilm.FlashStrength SRational 1 0/100
|
||||
Exif.Fujifilm.Macro Short 1 Off
|
||||
Exif.Fujifilm.FocusMode Short 1 Manual
|
||||
Exif.Fujifilm.SlowSync Short 1 Off
|
||||
Exif.Fujifilm.PictureMode Short 1 Shutter speed priority AE
|
||||
Exif.Fujifilm.Continuous Short 1 Off
|
||||
Exif.Fujifilm.SequenceNumber Short 1 0
|
||||
Exif.Fujifilm.BlurWarning Short 1 Off
|
||||
Exif.Fujifilm.FocusWarning Short 1 Off
|
||||
Exif.Fujifilm.ExposureWarning Short 1 On
|
||||
Exif.Fujifilm.DynamicRange Short 1 Standard
|
||||
Exif.Fujifilm.DynamicRangeSetting Short 1 Auto (100-400%)
|
||||
"""
|
||||
]
|
||||
stderr = [""] * 10
|
||||
retval = [0] * 10
|
||||
45
tests/bugfixes/redmine/test_issue_1202.py
Normal file
45
tests/bugfixes/redmine/test_issue_1202.py
Normal file
@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
@system_tests.CopyFiles("$data_path/exiv2-bug1202.jpg")
|
||||
class CheckFocusContinuous(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1202"
|
||||
filename = "$data_path/exiv2-bug1202_copy.jpg"
|
||||
|
||||
commands = [
|
||||
"""$exiv2 -M"set Exif.CanonCs.FocusContinuous SShort 0" $filename""",
|
||||
"""$exiv2 -K Exif.CanonCs.FocusContinuous $filename""",
|
||||
|
||||
"""$exiv2 -M"set Exif.CanonCs.FocusContinuous SShort 1" $filename""",
|
||||
"""$exiv2 -K Exif.CanonCs.FocusContinuous $filename""",
|
||||
|
||||
"""$exiv2 -M"set Exif.CanonCs.FocusContinuous SShort 8" $filename""",
|
||||
"""$exiv2 -K Exif.CanonCs.FocusContinuous $filename""",
|
||||
|
||||
"""$exiv2 -M"set Exif.CanonCs.FocusContinuous SShort 9" $filename""",
|
||||
"""$exiv2 -K Exif.CanonCs.FocusContinuous $filename""",
|
||||
|
||||
"""$exiv2 -M"set Exif.CanonCs.FocusContinuous SShort -1" $filename""",
|
||||
"""$exiv2 -K Exif.CanonCs.FocusContinuous $filename""",
|
||||
]
|
||||
|
||||
stdout = [
|
||||
"",
|
||||
"Exif.CanonCs.FocusContinuous Short 1 Single\n",
|
||||
|
||||
"",
|
||||
"Exif.CanonCs.FocusContinuous Short 1 Continuous\n",
|
||||
|
||||
"",
|
||||
"Exif.CanonCs.FocusContinuous Short 1 Manual\n",
|
||||
|
||||
"",
|
||||
"Exif.CanonCs.FocusContinuous Short 1 (9)\n",
|
||||
|
||||
"",
|
||||
"Exif.CanonCs.FocusContinuous Short 1 (65535)\n",
|
||||
]
|
||||
stderr = [""] * len(stdout)
|
||||
retval = [0] * len(stdout)
|
||||
23
tests/bugfixes/redmine/test_issue_1223.py
Normal file
23
tests/bugfixes/redmine/test_issue_1223.py
Normal file
@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class CheckShutterInPentax(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1223"
|
||||
filenames = ["$data_path/RAW_PENTAX_K30.exv",
|
||||
"$data_path/RAW_PENTAX_K100.exv"]
|
||||
|
||||
commands = [
|
||||
"$exiv2 -pa --grep Shutter " + filenames[0],
|
||||
"$exiv2 -pa --grep Shutter " + filenames[1],
|
||||
]
|
||||
|
||||
stdout = [
|
||||
"Exif.PentaxDng.ShutterCount Undefined 4 115\n",
|
||||
"Exif.Pentax.ShutterCount Undefined 4 24757\n",
|
||||
]
|
||||
|
||||
stderr = [""] * len(stdout)
|
||||
retval = [0] * len(stdout)
|
||||
20
tests/bugfixes/redmine/test_issue_1225.py
Normal file
20
tests/bugfixes/redmine/test_issue_1225.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class CheckBarometer(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1225"
|
||||
filename = "$data_path/exiv2-bug1225.exv"
|
||||
|
||||
commands = [
|
||||
"$exiv2 -pa --grep Bar $filename"
|
||||
]
|
||||
|
||||
stdout = [
|
||||
"Exif.Nikon3.BarometerInfo Undefined 12 1583\n"
|
||||
]
|
||||
|
||||
stderr = [""]
|
||||
retval = [0]
|
||||
40
tests/bugfixes/redmine/test_issue_1229.py
Normal file
40
tests/bugfixes/redmine/test_issue_1229.py
Normal file
@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
@system_tests.DeleteFiles("$filename_xmp")
|
||||
class CheckXmpData(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1229"
|
||||
filename = "$data_path/exiv2-bug1229.jpg"
|
||||
filename_xmp = "$data_path/exiv2-bug1229.xmp"
|
||||
|
||||
commands = ["""$exiv2 -eX $filename"""]
|
||||
|
||||
stdout = [""]
|
||||
stderr = [""]
|
||||
retval = [0]
|
||||
|
||||
def post_tests_hook(self):
|
||||
with open(self.filename_xmp, "r", encoding='utf-8') as xmp:
|
||||
content = xmp.read(-1)
|
||||
|
||||
expected = """<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<rdf:Description rdf:about=""
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
|
||||
xmpMM:InstanceID="uuid:e61b1e9d-b8e4-6a17-a443-74b51849baaf">
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>Celebs: JEnna Marbles</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
</rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
<?xpacket end="w"?>"""
|
||||
|
||||
self.assertMultiLineEqual(expected, content)
|
||||
29
tests/bugfixes/redmine/test_issue_1231.py
Normal file
29
tests/bugfixes/redmine/test_issue_1231.py
Normal file
@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class CheckTimeZones(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1231"
|
||||
filenames = ["$data_path/exiv2-bug1231a.jpg",
|
||||
"$data_path/exiv2-bug1231b.jpg"]
|
||||
|
||||
commands = [
|
||||
"$exiv2 -pa --grep CanonTi/i " + filenames[0],
|
||||
"$exiv2 -pa --grep CanonTi/i " + filenames[1]
|
||||
]
|
||||
|
||||
stdout = [
|
||||
"""Exif.CanonTi.TimeZone SLong 1 60
|
||||
Exif.CanonTi.TimeZoneCity SLong 1 n/a
|
||||
Exif.CanonTi.DaylightSavings SLong 1 0
|
||||
""",
|
||||
"""Exif.CanonTi.TimeZone SLong 1 120
|
||||
Exif.CanonTi.TimeZoneCity SLong 1 n/a
|
||||
Exif.CanonTi.DaylightSavings SLong 1 60
|
||||
""",
|
||||
]
|
||||
|
||||
stderr = [""] * len(stdout)
|
||||
retval = [0] * len(stdout)
|
||||
153
tests/bugfixes/redmine/test_issue_1242.py
Normal file
153
tests/bugfixes/redmine/test_issue_1242.py
Normal file
@ -0,0 +1,153 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class CheckShutterInPentax(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1242"
|
||||
filename = "$data_path/Reagan.jp2"
|
||||
|
||||
commands = ["$exiv2 -pa $filename"]
|
||||
|
||||
stdout = [r"""Exif.Image.ImageDescription Ascii 403 040621-N-6536T-062
|
||||
USS Ronald Reagan (CVN 76), June 21, 2004 - USS Ronald Reagan (CVN 76) sails through the Straits of Magellan on its way to the Pacific Ocean. The NavyÃs newest aircraft carrier is underway circumnavigating South America in transit to its new homeport of San Diego. U.S. Navy photo by PhotographerÃs Mate 3rd Class (AW) Elizabeth Thompson. (RELEASE)
|
||||
|
||||
Exif.Image.Make Ascii 18 NIKON CORPORATION
|
||||
Exif.Image.Model Ascii 10 NIKON D1X
|
||||
Exif.Image.Orientation Short 1 top, left
|
||||
Exif.Image.XResolution Rational 1 300
|
||||
Exif.Image.YResolution Rational 1 300
|
||||
Exif.Image.ResolutionUnit Short 1 inch
|
||||
Exif.Image.Software Ascii 40 Adobe Photoshop Elements 12.0 Macintosh
|
||||
Exif.Image.DateTime Ascii 20 2016:09:13 11:58:16
|
||||
Exif.Image.Artist Ascii 34 PhotographerÃs Mate 3rd Class (A
|
||||
Exif.Image.YCbCrPositioning Short 1 Centered
|
||||
Exif.Image.ExifTag Long 1 712
|
||||
Exif.Photo.ExposureTime Rational 1 1/125 s
|
||||
Exif.Photo.FNumber Rational 1 F5
|
||||
Exif.Photo.ExposureProgram Short 1 Manual
|
||||
Exif.Photo.ExifVersion Undefined 4 2.20
|
||||
Exif.Photo.DateTimeOriginal Ascii 20 2004:06:21 23:37:53
|
||||
Exif.Photo.DateTimeDigitized Ascii 20 2004:06:21 23:37:53
|
||||
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
|
||||
Exif.Photo.ShutterSpeedValue SRational 1 1/125 s
|
||||
Exif.Photo.ApertureValue Rational 1 F5
|
||||
Exif.Photo.ExposureBiasValue SRational 1 +1/3 EV
|
||||
Exif.Photo.MaxApertureValue Rational 1 F2.8
|
||||
Exif.Photo.MeteringMode Short 1 Center weighted average
|
||||
Exif.Photo.LightSource Short 1 Cloudy weather
|
||||
Exif.Photo.Flash Short 1 No flash
|
||||
Exif.Photo.FocalLength Rational 1 42.0 mm
|
||||
Exif.Photo.SubSecTime Ascii 3 06
|
||||
Exif.Photo.SubSecTimeOriginal Ascii 3 06
|
||||
Exif.Photo.SubSecTimeDigitized Ascii 3 06
|
||||
Exif.Photo.FlashpixVersion Undefined 4 1.00
|
||||
Exif.Photo.ColorSpace Short 1 Uncalibrated
|
||||
Exif.Photo.PixelXDimension Short 1 200
|
||||
Exif.Photo.PixelYDimension Short 1 130
|
||||
Exif.Photo.SensingMethod Short 1 One-chip color area
|
||||
Exif.Photo.FileSource Undefined 1 Digital still camera
|
||||
Exif.Photo.SceneType Undefined 1 Directly photographed
|
||||
Exif.Photo.CustomRendered Short 1 Normal process
|
||||
Exif.Photo.ExposureMode Short 1 Manual
|
||||
Exif.Photo.WhiteBalance Short 1 Manual
|
||||
Exif.Photo.DigitalZoomRatio Rational 1 1.0
|
||||
Exif.Photo.FocalLengthIn35mmFilm Short 1 63.0 mm
|
||||
Exif.Photo.SceneCaptureType Short 1 Standard
|
||||
Exif.Photo.GainControl Short 1 None
|
||||
Exif.Photo.Contrast Short 1 Normal
|
||||
Exif.Photo.Saturation Short 1 Normal
|
||||
Exif.Photo.Sharpness Short 1 Normal
|
||||
Exif.Photo.SubjectDistanceRange Short 1 Unknown
|
||||
Exif.Photo.ImageUniqueID Ascii 33 127c1377b054a3f65bf2754ebb24e7f2
|
||||
Exif.Image.GPSTag Long 1 1300
|
||||
Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0
|
||||
Iptc.Application2.RecordVersion Short 1 2
|
||||
Iptc.Application2.ObjectName String 18 040621-N-6536T-062
|
||||
Iptc.Application2.Urgency String 1 5
|
||||
Iptc.Application2.Category String 1 N
|
||||
Iptc.Application2.SuppCategory String 12 703-614-9154
|
||||
Iptc.Application2.SuppCategory String 23 navyvisualnews@navy.mil
|
||||
Iptc.Application2.SuppCategory String 11 UNCLASSFIED
|
||||
Iptc.Application2.Keywords String 13 ronald reagan
|
||||
Iptc.Application2.Keywords String 6 reagan
|
||||
Iptc.Application2.Keywords String 6 cvn 76
|
||||
Iptc.Application2.Keywords String 6 cvn-76
|
||||
Iptc.Application2.Keywords String 18 straights magellan
|
||||
Iptc.Application2.Keywords String 8 magellan
|
||||
Iptc.Application2.Keywords String 7 carrier
|
||||
Iptc.Application2.Keywords String 12 nimitz-class
|
||||
Iptc.Application2.Keywords String 4 ship
|
||||
Iptc.Application2.Keywords String 8 underway
|
||||
Iptc.Application2.SpecialInstructions String 49 Credit as U.S. Navy photo by Elizabeth Thompson.
|
||||
Iptc.Application2.DateCreated Date 8 2004-06-21
|
||||
Iptc.Application2.TimeCreated Time 11 00:00:00+00:00
|
||||
Iptc.Application2.DigitizationDate Date 8 2004-06-21
|
||||
Iptc.Application2.DigitizationTime Time 11 23:37:53-04:00
|
||||
Iptc.Application2.Byline String 31 Photographerís Mate 3rd Class (
|
||||
Iptc.Application2.BylineTitle String 21 U.S Navy Photographer
|
||||
Iptc.Application2.City String 19 Straits of Magellan
|
||||
Iptc.Application2.CountryName String 13 South America
|
||||
Iptc.Application2.Credit String 8 U.S Navy
|
||||
Iptc.Application2.Source String 24 Navy Visual News Service
|
||||
Iptc.Application2.Caption String 400 040621-N-6536T-062
|
||||
USS Ronald Reagan (CVN 76), June 21, 2004 - USS Ronald Reagan (CVN 76) sails through the Straits of Magellan on its way to the Pacific Ocean. The Navyís newest aircraft carrier is underway circumnavigating South America in transit to its new homeport of San Diego. U.S. Navy photo by Photographerís Mate 3rd Class (AW) Elizabeth Thompson. (RELEASE)
|
||||
|
||||
Iptc.Application2.Writer String 9 Dir. NVNS
|
||||
Xmp.xmp.ModifyDate XmpText 25 2016-09-13T11:58:16+01:00
|
||||
Xmp.xmp.CreateDate XmpText 25 2004-06-21T23:37:53+01:00
|
||||
Xmp.xmp.MetadataDate XmpText 25 2016-09-13T11:58:16+01:00
|
||||
Xmp.xmp.CreatorTool XmpText 38 Adobe Photoshop Elements 6.0 Macintosh
|
||||
Xmp.photoshop.Instructions XmpText 49 Credit as U.S. Navy photo by Elizabeth Thompson.
|
||||
Xmp.photoshop.CaptionWriter XmpText 9 Dir. NVNS
|
||||
Xmp.photoshop.Urgency XmpText 1 5
|
||||
Xmp.photoshop.City XmpText 19 Straits of Magellan
|
||||
Xmp.photoshop.Category XmpText 1 N
|
||||
Xmp.photoshop.Country XmpText 13 South America
|
||||
Xmp.photoshop.Credit XmpText 8 U.S Navy
|
||||
Xmp.photoshop.AuthorsPosition XmpText 21 U.S Navy Photographer
|
||||
Xmp.photoshop.DateCreated XmpText 10 2004-06-21
|
||||
Xmp.photoshop.Source XmpText 24 Navy Visual News Service
|
||||
Xmp.photoshop.LegacyIPTCDigest XmpText 32 977177A6C759A2BBD07317E3D5921073
|
||||
Xmp.photoshop.ColorMode XmpText 1 3
|
||||
Xmp.photoshop.ICCProfile XmpText 16 Adobe RGB (1998)
|
||||
Xmp.photoshop.SupplementalCategories XmpBag 3 703-614-9154, navyvisualnews@navy.mil, UNCLASSFIED
|
||||
Xmp.xmpMM.InstanceID XmpText 40 xmp.iid:F77F117407206811822A8C00775B3FDC
|
||||
Xmp.xmpMM.DocumentID XmpText 37 uuid:D6CBDC1D8DF2E511BA6BFBE914561F6D
|
||||
Xmp.xmpMM.OriginalDocumentID XmpText 37 uuid:D6CBDC1D8DF2E511BA6BFBE914561F6D
|
||||
Xmp.xmpMM.DerivedFrom XmpText 0 type="Struct"
|
||||
Xmp.xmpMM.DerivedFrom/stRef:instanceID XmpText 41 uuid:ec11a6b0-cc13-11d8-9c21-fa22e28297f6
|
||||
Xmp.xmpMM.DerivedFrom/stRef:documentID XmpText 58 adobe:docid:photoshop:1c90e091-c489-11d8-ad7d-b4c1b2598b09
|
||||
Xmp.xmpMM.History XmpText 0 type="Seq"
|
||||
Xmp.xmpMM.History[1] XmpText 0 type="Struct"
|
||||
Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved
|
||||
Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 40 xmp.iid:F77F117407206811822A8C00775B3FDC
|
||||
Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2016-09-13T11:58:16+01:00
|
||||
Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 39 Adobe Photoshop Elements 12.0 Macintosh
|
||||
Xmp.xmpMM.History[1]/stEvt:changed XmpText 1 /
|
||||
Xmp.dc.format XmpText 10 image/jpeg
|
||||
Xmp.dc.description LangAlt 1 lang="x-default" 040621-N-6536T-062
|
||||
USS Ronald Reagan (CVN 76), June 21, 2004 - USS Ronald Reagan (CVN 76) sails through the Straits of Magellan on its way to the Pacific Ocean. The NavyÃs newest aircraft carrier is underway circumnavigating South America in transit to its new homeport of San Diego. U.S. Navy photo by PhotographerÃs Mate 3rd Class (AW) Elizabeth Thompson. (RELEASE)
|
||||
|
||||
Xmp.dc.title LangAlt 1 lang="x-default" 040621-N-6536T-062
|
||||
Xmp.dc.creator XmpSeq 1 PhotographerÃs Mate 3rd Class (A
|
||||
Xmp.dc.subject XmpBag 10 ronald reagan, reagan, cvn 76, cvn-76, straights magellan, magellan, carrier, nimitz-class, ship, underway
|
||||
Xmp.xmpRights.Marked XmpText 5 False
|
||||
"""
|
||||
]
|
||||
|
||||
def compare_stdout(self, i, command, got_stdout, expected_stdout):
|
||||
"""
|
||||
The metadata in this file contain badly encoded strings with linefeeds
|
||||
only resulting in un-comparable strings. Here we check line by line
|
||||
instead, which removes the nasty line ending problems.
|
||||
"""
|
||||
for i, (got_line, expected_line) in \
|
||||
enumerate(zip(got_stdout.splitlines(), expected_stdout.splitlines())):
|
||||
self.assertEqual(
|
||||
got_line, expected_line, msg="error in line {:d}".format(i)
|
||||
)
|
||||
|
||||
stderr = [""]
|
||||
retval = [0]
|
||||
22
tests/bugfixes/redmine/test_issue_1247.py
Normal file
22
tests/bugfixes/redmine/test_issue_1247.py
Normal file
@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class NotValidIccProfile(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1247"
|
||||
filename = "$data_path/exiv2-bug1247.jpg"
|
||||
|
||||
commands = [
|
||||
"""$exiv2 -pa $filename"""
|
||||
]
|
||||
|
||||
stdout = [""]
|
||||
|
||||
stderr = [ """Exiv2 exception in print action for file $filename:
|
||||
Not a valid ICC Profile
|
||||
"""
|
||||
]
|
||||
|
||||
retval = [1]
|
||||
36
tests/bugfixes/redmine/test_issue_1252.py
Normal file
36
tests/bugfixes/redmine/test_issue_1252.py
Normal file
@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class CanonLenses(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1252"
|
||||
filenames = [
|
||||
"$data_path/exiv2-bug1252a.exv",
|
||||
"$data_path/exiv2-bug1252b.exv",
|
||||
]
|
||||
|
||||
commands = [
|
||||
"$exiv2 -pa --grep lens/i " + filenames[0],
|
||||
"$exiv2 -pa --grep lens/i " + filenames[1],
|
||||
]
|
||||
|
||||
stdout = ["""Exif.CanonCs.LensType Short 1 Sigma 120-300mm f/2.8 EX APO DG OS HSM
|
||||
Exif.CanonCs.Lens Short 3 120.0 - 300.0 mm
|
||||
Exif.Canon.LensModel Ascii 74 120-300mm
|
||||
Exif.Photo.LensSpecification Rational 4 120/1 300/1 0/1 0/1
|
||||
Exif.Photo.LensModel Ascii 10 120-300mm
|
||||
Exif.Photo.LensSerialNumber Ascii 11 0000000000
|
||||
""",
|
||||
"""Exif.CanonCs.LensType Short 1 Sigma 150-500mm f/5-6.3 APO DG OS HSM
|
||||
Exif.CanonCs.Lens Short 3 150.0 - 500.0 mm
|
||||
Exif.Canon.LensModel Ascii 74 150-500mm
|
||||
Exif.Photo.LensSpecification Rational 4 150/1 500/1 0/1 0/1
|
||||
Exif.Photo.LensModel Ascii 10 150-500mm
|
||||
Exif.Photo.LensSerialNumber Ascii 11 0000000000
|
||||
"""
|
||||
]
|
||||
|
||||
stderr = [""] * len(commands)
|
||||
retval = [0] * len(commands)
|
||||
46
tests/bugfixes/redmine/test_issue_1305.py
Normal file
46
tests/bugfixes/redmine/test_issue_1305.py
Normal file
@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
|
||||
class PentaxImageWithIssues(metaclass=system_tests.CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/1305"
|
||||
|
||||
filename = "$data_path/IMGP0006-min.jpg"
|
||||
|
||||
commands = ["$exiv2 $filename"]
|
||||
|
||||
stdout = ["""File name : $filename
|
||||
File size : 12341 Bytes
|
||||
MIME type : image/jpeg
|
||||
Image size : 0 x 0
|
||||
Camera make : PENTAX000000000000000000000000000000000000000000
|
||||
Camera model :
|
||||
Image timestamp :
|
||||
Image number :
|
||||
Exposure time :
|
||||
Aperture :
|
||||
Exposure bias :
|
||||
Flash :
|
||||
Flash bias :
|
||||
Focal length :
|
||||
Subject distance:
|
||||
ISO speed :
|
||||
Exposure mode :
|
||||
Metering mode :
|
||||
Macro mode :
|
||||
Image quality :
|
||||
Exif Resolution :
|
||||
White balance :
|
||||
Thumbnail : None
|
||||
Copyright :
|
||||
Exif comment :
|
||||
|
||||
"""
|
||||
]
|
||||
|
||||
stderr = [""] * len(commands)
|
||||
retval = [0] * len(commands)
|
||||
|
||||
compare_stderr = system_tests.check_no_ASAN_UBSAN_errors
|
||||
Loading…
Reference in New Issue
Block a user