Merge pull request #353 from Exiv2/redmine_issues_831_to_937

Port redmine issues 831 to 937 to the new testsuite
v0.27.3
D4N 7 years ago committed by GitHub
commit 493b7284ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
import unittest
import os.path
import shutil
import system_tests
RESOURCE_FORK_EXISTS = os.path.exists(
os.path.join(system_tests.data_path, "exiv2-bug836.eps/..namedfork/rsrc")
)
@unittest.skipUnless(RESOURCE_FORK_EXISTS,
"File system does not support resource forks")
@system_tests.CopyFiles("$data_path/exiv2-bug836.eps")
class WriteMetadataDestroysResourceForkOnMacOSXForBigFiles(
metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/836"
filename = "$data_path/exiv2-bug836_copy.eps"
filename_orig = "$data_path/exiv2-bug836.eps"
commands = [
"$exiv2 -M'set Exif.Photo.UserComment Test' $filename",
]
def setUp(self):
""" Copy the rsrc file into the the resource fork """
shutil.copyfile(
self.filename_orig + ".rsrc", self.filename + "/..namedfork/rsrc"
)
def post_tests_hook(self):
""" Check that the resource fork didn't change """
with open(self.filename_orig + ".rsrc", "rb") as rsrc_orig:
expected_resource_fork = rsrc_orig.read(-1)
with open(self.filename + "/..namedfork/rsrc", "rb") as rsrc_f:
got_resource_fork = rsrc_f.read(-1)
self.assertEqual(expected_resource_fork, got_resource_fork)
stdout = [""]
stderr = [""]
retval = [0]

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class ThrowOnInput(metaclass=CaseMeta):
url = "http://dev.exiv2.org/issues/841"
filename = path("$data_path/exiv2-bug841.png")
commands = ["$exiv2 $filename"]
stdout = [""]
stderr = [
"""$exiv2_exception_message $filename:
$kerFailedToReadImageData
"""
]
retval = [1]

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

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class Canon_EF_35mm_f_slash_2_IS_USM_Lens(metaclass=CaseMeta):
url = "http://dev.exiv2.org/issues/876"
filename = path("$data_path/exiv2-bug876.jpg")
commands = ["$exiv2 -pt --grep Model $filename"]
stdout = ["""Exif.Image.Model Ascii 13 Canon EOS 6D
Exif.Canon.ModelID Long 1 EOS 6D
Exif.Canon.LensModel Ascii 74 EF35mm f/2 IS USM
"""]
stderr = [""]
retval = [0]

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class NewTamronAndPentaxLenses(metaclass=CaseMeta):
url = "http://dev.exiv2.org/issues/884"
filenames = [
path("$data_path/exiv2-bug884{:s}.jpg".format(char))
for char in ["a", "b", "c"]
]
commands = [
"$exiv2 -pt --grep LensType " + fname for fname in filenames
]
stdout = [
"""Exif.Pentax.LensType Byte 2 Tamron SP AF 17-50mm F2.8 XR Di II
""",
"""Exif.Pentax.LensType Byte 2 smc PENTAX-F 35-70mm F3.5-4.5
""",
"""Exif.Pentax.LensType Byte 2 PENTAX-F 28-80mm F3.5-4.5
"""
]
stderr = [""] * len(commands)
retval = [0] * len(commands)

@ -0,0 +1,228 @@
# -*- coding: utf-8 -*-
import itertools
import os.path
from system_tests import CaseMeta, path
def read_file(filename):
with open(filename, 'r') as f:
return f.read()
class AddMinusPSOption(metaclass=CaseMeta):
cls_location = os.path.dirname(__file__)
url = "http://dev.exiv2.org/issues/922"
bug_jpg_file = path("$data_path/exiv2-bug922.jpg")
IPTC_file = path("$data_path/iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg")
files = [
path("$data_path/{!s}".format(img))
for img in "exiv2-bug922.png exiv2-bug922.tif exiv2-bug922a.jpg".split()
]
png_bug_file = files[0]
tif_bug_file = files[1]
jpg_bug_file = files[2]
commands = [
"$exiv2 -pX $bug_jpg_file",
"$exiv2 -pX $IPTC_file",
] + list(
itertools.chain.from_iterable([
"$exiv2 -pX " + fname,
"$exiv2 -pS " + fname
] for fname in files)
)
stdout = [
read_file(
os.path.join(cls_location, "issue_922_exiv2_pX_bug922_jpg_output")
),
"""<?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.1.1-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xap="http://ns.adobe.com/xap/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/"
xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
xmlns:exif="http://ns.adobe.com/exif/1.0/"
xap:CreateDate="2009-06-03T17:02:22+02:00"
xap:ModifyDate="2009-06-03T17:02:22+02:00"
xap:MetadataDate="2009-06-03T17:02:22+02:00"
xap:CreatorTool="Adobe Photoshop CS3 Macintosh"
dc:format="image/jpeg"
photoshop:ColorMode="3"
photoshop:History=""
xapMM:InstanceID="uuid:6E0DE597F251DE119368FCA8AE42D1CE"
xapMM:DocumentID="uuid:6D0DE597F251DE119368FCA8AE42D1CE"
tiff:Orientation="1"
tiff:XResolution="720000/10000"
tiff:YResolution="720000/10000"
tiff:ResolutionUnit="2"
tiff:NativeDigest="256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;A50D672D77BFA6B1794A470713D72F1B"
exif:PixelXDimension="420"
exif:PixelYDimension="300"
exif:ColorSpace="-1"
exif:NativeDigest="36864,40960,40961,37121,37122,40962,40963,37510,40964,36867,36868,33434,33437,34850,34852,34855,34856,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37396,41483,41484,41486,41487,41488,41492,41493,41495,41728,41729,41730,41985,41986,41987,41988,41989,41990,41991,41992,41993,41994,41995,41996,42016,0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,23,24,25,26,27,28,30;994BCC01E43CFBC321A79B1A803AAF9B">
<xapMM:DerivedFrom rdf:parseType="Resource"/>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>""",
"""<?xpacket begin="\ufeff" 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/">
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">this is the title</rdf:li>
</rdf:Alt>
</dc:title>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>""",
"""STRUCTURE OF PNG FILE: $png_bug_file
address | chunk | length | data | checksum
8 | IHDR | 13 | ...@........ | 0x7f775da4
33 | zTXt | 8769 | Raw profile type exif..x...[r. | 0x4a89d860
8814 | zTXt | 270 | Raw profile type iptc..x.=QKn. | 0x29f9e2d3
9096 | iTXt | 2524 | XML:com.adobe.xmp.....<?xpacke | 0x1df4a351
11632 | iCCP | 1404 | icc..x...i8........af\...w_3.. | 0x363e2409
13048 | sBIT | 3 | ... | 0xdbe14fe0
13063 | zTXt | 87 | Software..x...A.. ......B....} | 0xcd30861a
13162 | IDAT | 8192 | x...Y.$Wv&v.{.{l.T.......[w.=m | 0x1b2c97be
21366 | IDAT | 8192 | .4X.y.AR...4....:Ue..U.|1..:.. | 0xb3fecb3e
29570 | IDAT | 8192 | 'g.!... ...n...s..Jdz......... | 0xd040336d
37774 | IDAT | 8192 | ........k....CY/75I..u;.. .z.. | 0xf42a2c7d
45978 | IDAT | 8192 | .f>..]....UKqD2s.(.q....=x.l.\ | 0xc177fe83
54182 | IDAT | 8192 | .i.{!!B0...C!4.p..`D g`....... | 0x0e276268
62386 | IDAT | 8192 | .*.].4..Q..}(9...S0&.......T.9 | 0x297bb2db
70590 | IDAT | 8192 | ..k...6....g.1..}.].&.H....... | 0x05f6f4ef
78794 | IDAT | 8192 | .j..S.........z..!U.G0*.m%..09 | 0xe0946eb5
86998 | IDAT | 8192 | .....t.>!.....6^.<..;..?.$I..M | 0x843ecce0
95202 | IDAT | 8192 | W.&5.5J........FW`....3.N.9Pk; | 0x3a3dfeee
103406 | IDAT | 8192 | .....d.z".`...v=g-..-.c8...Z.5 | 0x65d6df49
111610 | IDAT | 8192 | .."...o<&."....1M....1&. ..5.. | 0x700b8cde
119814 | IDAT | 8192 | k........!..B*.....\*.(!..0.s. | 0x9b33b5b7
128018 | IDAT | 3346 | .Y.L@I$M.Z[.0A ...K#.t.0+.G(.j | 0x18044b20
131376 | IEND | 0 | | 0xae426082
""",
"""<?xpacket begin="\ufeff" 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/">
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">this is a title</rdf:li>
</rdf:Alt>
</dc:title>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>""",
"""STRUCTURE OF TIFF FILE (MM): $tif_bug_file
address | tag | type | count | offset | value
10 | 0x0100 ImageWidth | SHORT | 1 | | 40
22 | 0x0101 ImageLength | SHORT | 1 | | 470
34 | 0x0102 BitsPerSample | SHORT | 3 | 182 | 8 8 8
46 | 0x0103 Compression | SHORT | 1 | | 5
58 | 0x0106 PhotometricInterpretation | SHORT | 1 | | 2
70 | 0x0111 StripOffsets | LONG | 1 | | 2694
82 | 0x0112 Orientation | SHORT | 1 | | 6
94 | 0x0115 SamplesPerPixel | SHORT | 1 | | 3
106 | 0x0116 RowsPerStrip | SHORT | 1 | | 1092
118 | 0x0117 StripByteCounts | LONG | 1 | | 5086
130 | 0x011c PlanarConfiguration | SHORT | 1 | | 1
142 | 0x013d Predictor | SHORT | 1 | | 2
154 | 0x0153 SampleFormat | SHORT | 3 | 188 | 1 1 1
166 | 0x02bc XMLPacket | BYTE | 2500 | 194 | <?xpacket begin="..." id="W5M0Mp ...
END $tif_bug_file
""",
"""<?xpacket begin="\ufeff" 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:xmp="http://ns.adobe.com/xap/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmp:Rating="0" xmp:ModifyDate="2015-02-13T20:46:51-06:00"> <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">the rest drink soda</rdf:li> <rdf:li xml:lang="en-GB">the Brits are in the bar</rdf:li> <rdf:li xml:lang="de-DE">the Germans like beer</rdf:li> </rdf:Alt> </dc:title> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?>""",
"""STRUCTURE OF JPEG FILE: $jpg_bug_file
address | marker | length | data
0 | 0xffd8 SOI
2 | 0xffe1 APP1 | 14862 | Exif..II*......................
14866 | 0xffe1 APP1 | 2720 | http://ns.adobe.com/xap/1.0/.<?x
17588 | 0xffed APP13 | 110 | Photoshop 3.0.8BIM.......6.....
17700 | 0xffe2 APP2 | 4094 | MPF.II*...............0100.....
21796 | 0xffdb DQT | 132
21930 | 0xffc0 SOF0 | 17
21949 | 0xffc4 DHT | 418
22369 | 0xffda SOS
""",
]
stderr = [""] * 8
retval = [0] * 8

@ -0,0 +1,81 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, CopyFiles, path
@CopyFiles("$data_path/exiv2-empty.jpg")
class FixMetadataDifferenceToExiftool(metaclass=CaseMeta):
url = "http://dev.exiv2.org/issues/935"
filename = path("$data_path/exiv2-empty_copy.jpg")
commands = [
"""$exiv2 -u -v -M"set Exif.Photo.ExposureTime 605/10" $filename""",
"""$exiv2 -u -pv -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -pa -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -v -M"set Exif.Photo.ExposureTime 2/3" $filename""",
"""$exiv2 -u -pv -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -pa -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -v -M"set Exif.Photo.ExposureTime 0/0" $filename""",
"""$exiv2 -u -pv -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -pa -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -v -M"set Exif.Photo.ExposureTime 605/605" $filename""",
"""$exiv2 -u -pv -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -pa -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -v -M"set Exif.Photo.ExposureTime 100/1500" $filename""",
"""$exiv2 -u -pv -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -pa -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -v -M"set Exif.Photo.ExposureTime Ascii Test" $filename""",
"""$exiv2 -u -pv -gExif.Photo.ExposureTime $filename""",
"""$exiv2 -u -pa -gExif.Photo.ExposureTime $filename""",
]
stdout = [
"""File 1/1: $filename
Set Exif.Photo.ExposureTime "605/10" (Rational)
""",
"""0x829a Photo ExposureTime Rational 1 605/10
""",
"""Exif.Photo.ExposureTime Rational 1 60.5 s
""",
"""File 1/1: $filename
Set Exif.Photo.ExposureTime "2/3" (Rational)
""",
"""0x829a Photo ExposureTime Rational 1 2/3
""",
"""Exif.Photo.ExposureTime Rational 1 0.666667 s
""",
"""File 1/1: $filename
Set Exif.Photo.ExposureTime "0/0" (Rational)
""",
"""0x829a Photo ExposureTime Rational 1 0/0
""",
"""Exif.Photo.ExposureTime Rational 1 (0/0)
""",
"""File 1/1: $filename
Set Exif.Photo.ExposureTime "605/605" (Rational)
""",
"""0x829a Photo ExposureTime Rational 1 605/605
""",
"""Exif.Photo.ExposureTime Rational 1 1 s
""",
"""File 1/1: $filename
Set Exif.Photo.ExposureTime "100/1500" (Rational)
""",
"""0x829a Photo ExposureTime Rational 1 100/1500
""",
"""Exif.Photo.ExposureTime Rational 1 1/15 s
""",
"""File 1/1: $filename
Set Exif.Photo.ExposureTime "Test" (Ascii)
""",
"""0x829a Photo ExposureTime Ascii 5 Test
""",
"""Exif.Photo.ExposureTime Ascii 5 (Test)
"""
]
stderr = [""] * 18
retval = [0] * 18

@ -0,0 +1,407 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, CopyFiles, path
URL = "http://dev.exiv2.org/issues/937"
class DarwinCoreXmpMetadataPrint(metaclass=CaseMeta):
filename = path("$data_path/exiv2-bug937.jpg")
commands = [
"$exiv2 -q -pa -g dwc $filename",
"$exiv2 -q -PXkyctl -g Date $filename",
]
stdout = [
"""Xmp.dwc.Record XmpText 0 type="Struct"
Xmp.dwc.Record/dwc:institutionID XmpText 25 Charles Darwin Foundation
Xmp.dwc.Record/dwc:collectionID XmpText 29 urn:lsid:biocol.org:col:34818
Xmp.dwc.Record/dwc:institutionCode XmpText 3 CDS
Xmp.dwc.Record/dwc:datasetID XmpText 3 MVZ
Xmp.dwc.Record/dwc:collectionCode XmpText 7 Mammals
Xmp.dwc.Record/dwc:datasetName XmpText 25 Grinnell Resurvey Mammals
Xmp.dwc.Record/dwc:ownerInstitutionCode XmpText 3 NPS
Xmp.dwc.Record/dwc:basisOfRecord XmpText 14 FossilSpecimen
Xmp.dwc.Record/dwc:informationWithheld XmpText 53 location information not given for endangered species
Xmp.dwc.Record/dwc:dataGeneralizations XmpText 90 Coordinates generalized from original GPS coordinates to the nearest half degree grid cell
Xmp.dwc.Record/dwc:dynamicProperties XmpText 45 targusLengthInMeters=0.014; weightInGrams=120
Xmp.dwc.Occurrence XmpText 0 type="Struct"
Xmp.dwc.Occurrence/dwc:occurrenceID XmpText 28 urn:lsid:nhm.ku.edu:Herps:32
Xmp.dwc.Occurrence/dwc:catalogNumber XmpText 9 2008.1334
Xmp.dwc.Occurrence/dwc:occurrenceDetails XmpText 50 http://mvzarctos.berkeley.edu/guid/MVZ:Mamm:165861
Xmp.dwc.Occurrence/dwc:recordNumber XmpText 8 OPP 7101
Xmp.dwc.Occurrence/dwc:recordedBy XmpText 17 Oliver P. Pearson
Xmp.dwc.Occurrence/dwc:individualID XmpText 10 U.amer. 44
Xmp.dwc.Occurrence/dwc:individualCount XmpText 1 1
Xmp.dwc.Occurrence/dwc:sex XmpText 6 female
Xmp.dwc.Occurrence/dwc:lifeStage XmpText 3 egg
Xmp.dwc.Occurrence/dwc:reproductiveCondition XmpText 16 non-reproductive
Xmp.dwc.Occurrence/dwc:behavior XmpText 8 roosting
Xmp.dwc.Occurrence/dwc:establishmentMeans XmpText 10 cultivated
Xmp.dwc.Occurrence/dwc:occurrenceStatus XmpText 7 present
Xmp.dwc.Occurrence/dwc:preparations XmpText 4 skin
Xmp.dwc.Occurrence/dwc:disposition XmpText 13 in collection
Xmp.dwc.Occurrence/dwc:otherCatalogNumbers XmpText 16 FNMH:Mammal:1234
Xmp.dwc.Occurrence/dwc:previousIdentifications XmpText 109 Anthus sp., field ID by G. Iglesias; Anthus correndera, expert ID by C. Cicero 2009-02-12 based on morphology
Xmp.dwc.Occurrence/dwc:associatedMedia XmpText 71 http://arctos.database.museum/SpecimenImages/UAMObs/Mamm/2/P7291179.JPG
Xmp.dwc.Occurrence/dwc:associatedReferences XmpText 153 Christopher J. Conroy, Jennifer L. Neuwald. 2008. Phylogeographic study of the California vole, Microtus californicus Journal of Mammalogy, 89(3):755-767
Xmp.dwc.Occurrence/dwc:associatedOccurrences XmpText 56 sibling of FMNH:Mammal:1234; sibling of FMNH:Mammal:1235
Xmp.dwc.Occurrence/dwc:associatedSequences XmpText 16 GenBank:U34853.1
Xmp.dwc.Occurrence/dwc:associatedTaxa XmpText 17 host:Quercus alba
Xmp.dwc.Occurrence/dwc:occurrenceRemarks XmpText 18 found dead on road
Xmp.dwc.Event XmpText 0 type="Struct"
Xmp.dwc.Event/dwc:eventID XmpText 4 1234
Xmp.dwc.Event/dwc:samplingProtocol XmpText 134 Penguins from space: faecal stains reveal the location of emperor penguin colonies, http://dx.doi.org/10.1111/j.1466-8238.2009.00467.x
Xmp.dwc.Event/dwc:samplingEffort XmpText 14 40 trap-nights
Xmp.dwc.Event/dwc:earliestDate XmpText 25 2012-09-03T00:00:00-06:00
Xmp.dwc.Event/dwc:latestDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.Event/dwc:eventTime XmpText 25 1899-12-30T01:41:33+03:00
Xmp.dwc.Event/dwc:startDayOfYear XmpText 1 1
Xmp.dwc.Event/dwc:endDayOfYear XmpText 3 366
Xmp.dwc.Event/dwc:year XmpText 4 2008
Xmp.dwc.Event/dwc:month XmpText 2 10
Xmp.dwc.Event/dwc:day XmpText 2 31
Xmp.dwc.Event/dwc:habitat XmpText 11 oak savanna
Xmp.dwc.Event/dwc:verbatimEventDate XmpText 11 spring 1910
Xmp.dwc.Event/dwc:fieldNumber XmpText 16 RV Sol 87-03-08
Xmp.dwc.Event/dwc:fieldNotes XmpText 42 notes available in Grinnell-Miller Library
Xmp.dwc.Event/dwc:eventRemarks LangAlt 1 lang="x-default" after the recent rains the river is nearly at flood stage
Xmp.dwc.dctermsLocation XmpText 0 type="Struct"
Xmp.dwc.dctermsLocation/dwc:locationID XmpText 4 1234
Xmp.dwc.dctermsLocation/dwc:higherGeographyID XmpText 11 TGN:1002002
Xmp.dwc.dctermsLocation/dwc:higherGeography XmpText 24 South America; Argenitna
Xmp.dwc.dctermsLocation/dwc:continent XmpText 10 Antarctica
Xmp.dwc.dctermsLocation/dwc:waterBody XmpText 12 Indian Ocean
Xmp.dwc.dctermsLocation/dwc:islandGroup XmpText 21 Alexander Archipelago
Xmp.dwc.dctermsLocation/dwc:island XmpText 13 Isla Victoria
Xmp.dwc.dctermsLocation/dwc:country XmpText 7 Denmark
Xmp.dwc.dctermsLocation/dwc:countryCode XmpText 2 AR
Xmp.dwc.dctermsLocation/dwc:stateProvince XmpText 7 Montana
Xmp.dwc.dctermsLocation/dwc:county XmpText 8 Missoula
Xmp.dwc.dctermsLocation/dwc:municipality XmpText 10 Holzminden
Xmp.dwc.dctermsLocation/dwc:locality XmpText 50 25 km NNEoc Bariloche along National Road no. 237
Xmp.dwc.dctermsLocation/dwc:verbatimLocality XmpText 35 25 km NNE Bariloche por R. Nac. 237
Xmp.dwc.dctermsLocation/dwc:verbatimElevation XmpText 9 100-200 m
Xmp.dwc.dctermsLocation/dwc:minimumElevationInMeters XmpText 3 100
Xmp.dwc.dctermsLocation/dwc:maximumElevationInMeters XmpText 3 200
Xmp.dwc.dctermsLocation/dwc:verbatimDepth XmpText 9 100-200 m
Xmp.dwc.dctermsLocation/dwc:minimumDepthInMeters XmpText 3 100
Xmp.dwc.dctermsLocation/dwc:maximumDepthInMeters XmpText 3 100
Xmp.dwc.dctermsLocation/dwc:minimumDistanceAboveSurfaceInMeters XmpText 82 1.5 meter sediment core from the bottom of a lake (at depth 20m) at 300m elevation
Xmp.dwc.dctermsLocation/dwc:maximumDistanceAboveSurfaceInMeters XmpText 82 1.5 meter sediment core from the bottom of a lake (at depth 20m) at 300m elevation
Xmp.dwc.dctermsLocation/dwc:locationAccordingTo XmpText 35 Getty Thesaurus of Geographic Names
Xmp.dwc.dctermsLocation/dwc:locationRemarks XmpText 22 under water since 2005
Xmp.dwc.dctermsLocation/dwc:verbatimCoordinates XmpText 20 41 05 54S 121 05 34W
Xmp.dwc.dctermsLocation/dwc:verbatimLatitude XmpText 12 41 05 54.03S
Xmp.dwc.dctermsLocation/dwc:verbatimLongitude XmpText 10 121 05 34W
Xmp.dwc.dctermsLocation/dwc:verbatimCoordinateSystem XmpText 3 UTM
Xmp.dwc.dctermsLocation/dwc:verbatimSRS XmpText 5 WGS84
Xmp.dwc.dctermsLocation/dwc:decimalLatitude XmpText 11 -41.0983423
Xmp.dwc.dctermsLocation/dwc:decimalLongitude XmpText 12 -121.1761111
Xmp.dwc.dctermsLocation/dwc:geodeticDatum XmpText 5 WGS84
Xmp.dwc.dctermsLocation/dwc:coordinateUncertaintyInMeters XmpText 2 30
Xmp.dwc.dctermsLocation/dwc:coordinatePrecision XmpText 7 0.00001
Xmp.dwc.dctermsLocation/dwc:pointRadiusSpatialFit XmpText 1 1
Xmp.dwc.dctermsLocation/dwc:footprintWKT XmpText 45 POLYGON ((10 20, 11 20, 11 21, 10 21, 10 20))
Xmp.dwc.dctermsLocation/dwc:footprintSRS XmpText 12 GCS_WGS_1984
Xmp.dwc.dctermsLocation/dwc:footprintSpatialFit XmpText 1 1
Xmp.dwc.dctermsLocation/dwc:georeferencedBy XmpText 17 Kristina Yamamoto
Xmp.dwc.dctermsLocation/dwc:georeferenceProtocol XmpText 45 MaNIS/HerpNet/ORNIS Georeferencing Guidelines
Xmp.dwc.dctermsLocation/dwc:georeferenceSources XmpText 35 USGS 1:24,000 Florence Montana Quad
Xmp.dwc.dctermsLocation/dwc:georeferenceVerificationStatus XmpText 21 requires verification
Xmp.dwc.dctermsLocation/dwc:georeferenceRemarks XmpText 35 assumed distance by road (Hwy. 101)
Xmp.dwc.GeologicalContext XmpText 0 type="Struct"
Xmp.dwc.GeologicalContext/dwc:geologicalContextID XmpText 4 1234
Xmp.dwc.GeologicalContext/dwc:earliestEonOrLowestEonothem XmpText 11 Phanerozoic
Xmp.dwc.GeologicalContext/dwc:latestEonOrHighestEonothem XmpText 11 Proterozoic
Xmp.dwc.GeologicalContext/dwc:earliestEraOrLowestErathem XmpText 8 Cenozoic
Xmp.dwc.GeologicalContext/dwc:earliestPeriodOrLowestSystem XmpText 7 Neogene
Xmp.dwc.GeologicalContext/dwc:latestPeriodOrHighestSystem XmpText 8 Tertiary
Xmp.dwc.GeologicalContext/dwc:earliestEpochOrLowestSeries XmpText 11 Pleistocene
Xmp.dwc.GeologicalContext/dwc:latestEpochOrHighestSeries XmpText 14 Ibexian Series
Xmp.dwc.GeologicalContext/dwc:earliestAgeOrLowestStage XmpText 8 Atlantic
Xmp.dwc.GeologicalContext/dwc:latestAgeOrHighestStage XmpText 6 Boreal
Xmp.dwc.GeologicalContext/dwc:lowestBiostratigraphicZone XmpText 6 Boreal
Xmp.dwc.GeologicalContext/dwc:highestBiostratigraphicZone XmpText 8 Atlantic
Xmp.dwc.GeologicalContext/dwc:lithostratigraphicTerms XmpText 10 Supergroup
Xmp.dwc.GeologicalContext/dwc:group XmpText 16 Notch Peak Group
Xmp.dwc.GeologicalContext/dwc:formation XmpText 20 Notch Peak Formation
Xmp.dwc.GeologicalContext/dwc:member XmpText 15 Lava Dam Member
Xmp.dwc.GeologicalContext/dwc:bed XmpText 12 Lava Dam Bed
Xmp.dwc.Identification XmpText 0 type="Struct"
Xmp.dwc.Identification/dwc:identificationID XmpText 4 1234
Xmp.dwc.Identification/dwc:identifiedBy XmpText 15 James L. Patton
Xmp.dwc.Identification/dwc:dateIdentified XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.Identification/dwc:identificationReferences XmpText 50 Aves del Noroeste Patagonico. Christie et al. 2004
Xmp.dwc.Identification/dwc:identificationRemarks XmpText 106 Distinguished between Anthus correndera and Anthus hellmayri based on the comparative lengths of the uñas
Xmp.dwc.Identification/dwc:identificationQualifier XmpText 29 aff. agrifolia var. oxyadenia
Xmp.dwc.Identification/dwc:typeStatus XmpText 101 holotype of Ctenomys sociabilis. Pearson O. P., and M. I. Christie. 1985. Historia Natural, 5(37):388
Xmp.dwc.Taxon XmpText 0 type="Struct"
Xmp.dwc.Taxon/dwc:taxonID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:scientificNameID XmpText 35 urn:lsid:ipni.org:names:37829-1:1.3
Xmp.dwc.Taxon/dwc:acceptedNameUsageID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:parentNameUsageID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:nameAccordingToID XmpText 33 doi:10.1016/S0269-915X(97)80026-2
Xmp.dwc.Taxon/dwc:namePublishedInID XmpText 29 http://hdl.handle.net/10199/7
Xmp.dwc.Taxon/dwc:taxonConceptID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:scientificName XmpText 19 Ctenomys sociabilis
Xmp.dwc.Taxon/dwc:acceptedNameUsage XmpText 46 Tamias minimus valid name for Eutamias minimus
Xmp.dwc.Taxon/dwc:parentNameUsage XmpText 9 Rubiaceae
Xmp.dwc.Taxon/dwc:originalNameUsage XmpText 36 Gasterosteus saltatrix Linnaeus 1768
Xmp.dwc.Taxon/dwc:nameAccordingTo XmpText 235 McCranie, J. R., D. B. Wake, and L. D. Wilson. 1996. The taxonomic status of Bolitoglossa schmidti, with comments on the biology of the Mesoamerican salamander Bolitoglossa dofleini (Caudata: Plethodontidae). Carib. J. Sci. 32:395-398.
Xmp.dwc.Taxon/dwc:namePublishedIn XmpText 68 Pearson O. P., and M. I. Christie. 1985. Historia Natural, 5(37):388
Xmp.dwc.Taxon/dwc:higherClassification XmpText 124 Animalia;Chordata;Vertebrata;Mammalia;Theria;Eutheria;Rodentia;Hystricognatha;Hystricognathi;Ctenomyidae;Ctenomyini;Ctenomys
Xmp.dwc.Taxon/dwc:kingdom XmpText 8 Animalia
Xmp.dwc.Taxon/dwc:phylum XmpText 8 Chordata
Xmp.dwc.Taxon/dwc:class XmpText 10 Vertebrata
Xmp.dwc.Taxon/dwc:order XmpText 8 Mammalia
Xmp.dwc.Taxon/dwc:family XmpText 7 Felidae
Xmp.dwc.Taxon/dwc:genus XmpText 4 Puma
Xmp.dwc.Taxon/dwc:subgenus XmpText 4 Puma
Xmp.dwc.Taxon/dwc:specificEpithet XmpText 8 concolor
Xmp.dwc.Taxon/dwc:taxonRank XmpText 10 subspecies
Xmp.dwc.Taxon/dwc:verbatimTaxonRank XmpText 12 Agamospecies
Xmp.dwc.Taxon/dwc:infraspecificEpithet XmpText 8 concolor
Xmp.dwc.Taxon/dwc:scientificNameAuthorship XmpText 19 (Torr.) J.T. Howell
Xmp.dwc.Taxon/dwc:nomenclaturalCode XmpText 4 ICBN
Xmp.dwc.Taxon/dwc:vernacularName LangAlt 1 lang="x-default" Andean Condor
Xmp.dwc.Taxon/dwc:taxonomicStatus XmpText 7 invalid
Xmp.dwc.Taxon/dwc:nomenclaturalStatus XmpText 11 nom. ambig.
Xmp.dwc.Taxon/dwc:taxonRemarks XmpText 39 this name is a mispelling in common use
Xmp.dwc.ResourceRelationship XmpText 0 type="Struct"
Xmp.dwc.ResourceRelationship/dwc:resourceRelationshipID XmpText 4 1234
Xmp.dwc.ResourceRelationship/dwc:resourceID XmpText 4 1234
Xmp.dwc.ResourceRelationship/dwc:relatedResourceID XmpText 4 1234
Xmp.dwc.ResourceRelationship/dwc:relationshipOfResource XmpText 12 duplicate of
Xmp.dwc.ResourceRelationship/dwc:relationshipAccordingTo XmpText 14 Julie Woodruff
Xmp.dwc.ResourceRelationship/dwc:relationshipEstablishedDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.ResourceRelationship/dwc:relationshipRemarks XmpText 30 pollinator captured in the act
Xmp.dwc.MeasurementOrFact XmpText 0 type="Struct"
Xmp.dwc.MeasurementOrFact/dwc:measurementID XmpText 4 1234
Xmp.dwc.MeasurementOrFact/dwc:measurementType XmpText 11 tail length
Xmp.dwc.MeasurementOrFact/dwc:measurementValue XmpText 2 45
Xmp.dwc.MeasurementOrFact/dwc:measurementAccuracy XmpText 4 0.01
Xmp.dwc.MeasurementOrFact/dwc:measurementUnit XmpText 2 mm
Xmp.dwc.MeasurementOrFact/dwc:measurementDeterminedDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.MeasurementOrFact/dwc:measurementDeterminedBy XmpText 18 Javier de la Torre
Xmp.dwc.MeasurementOrFact/dwc:measurementMethod XmpText 20 barometric altimeter
Xmp.dwc.MeasurementOrFact/dwc:measurementRemarks XmpText 19 tip of tail missing
""",
"""Xmp.exif.DateTimeDigitized Date and Time Digitized XmpText 29 2008-03-14T11:31:48.098-07:00
Xmp.exif.DateTimeOriginal Date and Time Original XmpText 25 2008-03-14T13:59:26-06:00
Xmp.photoshop.DateCreated Date Created XmpText 29 2008-03-14T13:59:26.054-06:00
Xmp.xmp.MetadataDate Metadata Date XmpText 29 2013-02-07T21:56:33.820-06:00
Xmp.xmp.CreateDate Create Date XmpText 24 2008-03-14T20:59:26.535Z
Xmp.xmp.ModifyDate Modify Date XmpText 25 2013-01-27T14:02:29-06:00
Xmp.dwc.Event/dwc:earliestDate Event/dwc:earliestDate XmpText 25 2012-09-03T00:00:00-06:00
Xmp.dwc.Event/dwc:latestDate Event/dwc:latestDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.Event/dwc:verbatimEventDate Event/dwc:verbatimEventDate XmpText 11 spring 1910
Xmp.dwc.ResourceRelationship/dwc:relationshipEstablishedDate ResourceRelationship/dwc:relationshipEstablishedDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.MeasurementOrFact/dwc:measurementDeterminedDate MeasurementOrFact/dwc:measurementDeterminedDate XmpText 25 2013-01-27T00:00:00-06:00
"""
]
stderr = [""] * 2
retval = [0] * 2
@CopyFiles("$data_path/exiv2.dc.dwc.i18n.jpg")
class DarwinCoreXmpMetadataModify(metaclass=CaseMeta):
filename = path("$data_path/exiv2.dc.dwc.i18n_copy.jpg")
dataname = path("$data_path/exiv2.dc.dwc.i18n.txt")
commands = [
"$exiv2 -pa $filename",
"$exiv2 -m $dataname $filename",
"$exiv2 -pa $filename"
]
stdout = [
"",
"",
"""Xmp.dwc.Record XmpText 0 type="Struct"
Xmp.dwc.Record/dwc:basisOfRecord XmpText 14 FossilSpecimen
Xmp.dwc.Record/dwc:collectionCode XmpText 7 Mammals
Xmp.dwc.Record/dwc:collectionID XmpText 29 urn:lsid:biocol.org:col:34818
Xmp.dwc.Record/dwc:dataGeneralizations XmpText 23 Coordinates generalized
Xmp.dwc.Record/dwc:datasetID XmpText 3 MVZ
Xmp.dwc.Record/dwc:datasetName XmpText 17 Grinnell Resurvey
Xmp.dwc.Record/dwc:informationWithheld XmpText 20 location information
Xmp.dwc.Record/dwc:institutionCode XmpText 3 CDS
Xmp.dwc.Record/dwc:institutionID XmpText 14 Charles Darwin
Xmp.dwc.Record/dwc:ownerInstitutionCode XmpText 3 NPS
Xmp.dwc.Record/dwc:dynamicProperties XmpBag 1 targusLengthInMeters=0.014; weightInGrams=120
Xmp.dwc.Occurrence XmpText 0 type="Struct"
Xmp.dwc.Occurrence/dwc:behavior XmpText 8 roosting
Xmp.dwc.Occurrence/dwc:catalogNumber XmpText 9 2008.1334
Xmp.dwc.Occurrence/dwc:disposition XmpText 13 in collection
Xmp.dwc.Occurrence/dwc:establishmentMeans XmpText 10 cultivated
Xmp.dwc.Occurrence/dwc:individualCount XmpText 2 23
Xmp.dwc.Occurrence/dwc:individualID XmpText 10 U.amer. 44
Xmp.dwc.Occurrence/dwc:lifeStage XmpText 3 egg
Xmp.dwc.Occurrence/dwc:occurrenceDetails XmpText 50 http://mvzarctos.berkeley.edu/guid/MVZ:Mamm:165861
Xmp.dwc.Occurrence/dwc:occurrenceID XmpText 28 urn:lsid:nhm.ku.edu:Herps:32
Xmp.dwc.Occurrence/dwc:occurrenceRemarks XmpText 10 found dead
Xmp.dwc.Occurrence/dwc:occurrenceStatus XmpText 7 present
Xmp.dwc.Occurrence/dwc:recordNumber XmpText 8 OPP 7101
Xmp.dwc.Occurrence/dwc:reproductiveCondition XmpText 16 non-reproductive
Xmp.dwc.Occurrence/dwc:sex XmpText 6 female
Xmp.dwc.Occurrence/dwc:associatedMedia XmpBag 1 http://arctos.database.museum/SpecimenImages/UAMObs/Mamm/2/P7291179.JPG
Xmp.dwc.Occurrence/dwc:associatedOccurrences XmpBag 1 sibling of
Xmp.dwc.Occurrence/dwc:associatedReferences XmpBag 1 Christopher J. 89(3):755-76
Xmp.dwc.Occurrence/dwc:associatedSequences XmpBag 1 GenBank:U34853.1
Xmp.dwc.Occurrence/dwc:associatedTaxa XmpBag 1 host:Quercus alba
Xmp.dwc.Occurrence/dwc:otherCatalogNumbers XmpBag 1 FNMH:Mammal:1234
Xmp.dwc.Occurrence/dwc:preparations XmpBag 1 skin
Xmp.dwc.Occurrence/dwc:previousIdentifications XmpBag 1 Anthus sp.,
Xmp.dwc.Occurrence/dwc:recordedBy XmpBag 1 Oliver P.
Xmp.dwc.Event XmpText 0 type="Struct"
Xmp.dwc.Event/dwc:day XmpText 2 31
Xmp.dwc.Event/dwc:earliestDate XmpText 25 2012-09-03T00:00:00-06:00
Xmp.dwc.Event/dwc:latestDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.Event/dwc:endDayOfYear XmpText 3 366
Xmp.dwc.Event/dwc:eventID XmpText 4 1234
Xmp.dwc.Event/dwc:eventTime XmpText 14 01:41:33+03:00
Xmp.dwc.Event/dwc:eventDate XmpText 25 1899-12-30T01:41:33+03:00
Xmp.dwc.Event/dwc:fieldNotes XmpText 15 notes available
Xmp.dwc.Event/dwc:fieldNumber XmpText 6 RV Sol
Xmp.dwc.Event/dwc:habitat XmpText 11 oak savanna
Xmp.dwc.Event/dwc:month XmpText 2 10
Xmp.dwc.Event/dwc:samplingEffort XmpText 14 40 trap-nights
Xmp.dwc.Event/dwc:samplingProtocol XmpText 13 Penguins from
Xmp.dwc.Event/dwc:startDayOfYear XmpText 1 1
Xmp.dwc.Event/dwc:verbatimEventDate XmpText 11 spring 1910
Xmp.dwc.Event/dwc:year XmpText 4 1999
Xmp.dwc.Event/dwc:eventRemarks XmpText 16 lang=en-us after
Xmp.dwc.dctermsLocation XmpText 0 type="Struct"
Xmp.dwc.dctermsLocation/dwc:continent XmpText 10 Antarctica
Xmp.dwc.dctermsLocation/dwc:coordinatePrecision XmpText 7 0.00001
Xmp.dwc.dctermsLocation/dwc:coordinateUncertaintyInMeters XmpText 2 30
Xmp.dwc.dctermsLocation/dwc:country XmpText 7 Denmark
Xmp.dwc.dctermsLocation/dwc:countryCode XmpText 2 AR
Xmp.dwc.dctermsLocation/dwc:county XmpText 8 Missoula
Xmp.dwc.dctermsLocation/dwc:decimalLatitude XmpText 11 -41.0983423
Xmp.dwc.dctermsLocation/dwc:decimalLongitude XmpText 12 -121.1761111
Xmp.dwc.dctermsLocation/dwc:footprintSRS XmpText 12 GCS_WGS_1984
Xmp.dwc.dctermsLocation/dwc:footprintSpatialFit XmpText 1 1
Xmp.dwc.dctermsLocation/dwc:footprintWKT XmpText 12 POLYGON ((10
Xmp.dwc.dctermsLocation/dwc:geodeticDatum XmpText 5 WGS84
Xmp.dwc.dctermsLocation/dwc:georeferenceProtocol XmpText 34 MaNIS/HerpNet/ORNIS Georeferencing
Xmp.dwc.dctermsLocation/dwc:georeferenceRemarks XmpText 16 assumed distance
Xmp.dwc.dctermsLocation/dwc:georeferenceVerificationStatus XmpText 21 requires verification
Xmp.dwc.dctermsLocation/dwc:higherGeographyID XmpText 11 TGN:1002002
Xmp.dwc.dctermsLocation/dwc:island XmpText 13 Isla Victoria
Xmp.dwc.dctermsLocation/dwc:islandGroup XmpText 21 Alexander Archipelago
Xmp.dwc.dctermsLocation/dwc:locality XmpText 5 25 km
Xmp.dwc.dctermsLocation/dwc:locationAccordingTo XmpText 15 Getty Thesaurus
Xmp.dwc.dctermsLocation/dwc:locationID XmpText 7 EBT3000
Xmp.dwc.dctermsLocation/dwc:locationRemarks XmpText 11 under water
Xmp.dwc.dctermsLocation/dwc:maximumDepthInMeters XmpText 3 100
Xmp.dwc.dctermsLocation/dwc:maximumDistanceAboveSurfaceInMeters XmpText 9 1.5 meter
Xmp.dwc.dctermsLocation/dwc:maximumElevationInMeters XmpText 3 200
Xmp.dwc.dctermsLocation/dwc:minimumDepthInMeters XmpText 4 25.5
Xmp.dwc.dctermsLocation/dwc:minimumDistanceAboveSurfaceInMeters XmpText 9 1.5 meter
Xmp.dwc.dctermsLocation/dwc:minimumElevationInMeters XmpText 3 100
Xmp.dwc.dctermsLocation/dwc:municipality XmpText 10 Holzminden
Xmp.dwc.dctermsLocation/dwc:pointRadiusSpatialFit XmpText 1 1
Xmp.dwc.dctermsLocation/dwc:stateProvince XmpText 7 Montana
Xmp.dwc.dctermsLocation/dwc:verbatimCoordinateSystem XmpText 3 UTM
Xmp.dwc.dctermsLocation/dwc:verbatimCoordinates XmpText 4 41 5
Xmp.dwc.dctermsLocation/dwc:verbatimDepth XmpText 9 100-200 m
Xmp.dwc.dctermsLocation/dwc:verbatimElevation XmpText 9 100-200 m
Xmp.dwc.dctermsLocation/dwc:verbatimLatitude XmpText 4 41 5
Xmp.dwc.dctermsLocation/dwc:verbatimLocality XmpText 5 25 km
Xmp.dwc.dctermsLocation/dwc:verbatimLongitude XmpText 5 121 5
Xmp.dwc.dctermsLocation/dwc:verbatimSRS XmpText 5 WGS84
Xmp.dwc.dctermsLocation/dwc:waterBody XmpText 12 Indian Ocean
Xmp.dwc.dctermsLocation/dwc:georeferenceSources XmpBag 1 USGS 1:24,000
Xmp.dwc.dctermsLocation/dwc:georeferencedBy XmpBag 1 Kristina Yamamoto
Xmp.dwc.dctermsLocation/dwc:higherGeography XmpBag 1 South America;
Xmp.dwc.GeologicalContext XmpText 0 type="Struct"
Xmp.dwc.GeologicalContext/dwc:bed XmpText 8 Lava Dam
Xmp.dwc.GeologicalContext/dwc:earliestAgeOrLowestStage XmpText 8 Atlantic
Xmp.dwc.GeologicalContext/dwc:earliestEonOrLowestEonothem XmpText 11 Phanerozoic
Xmp.dwc.GeologicalContext/dwc:earliestEpochOrLowestSeries XmpText 11 Pleistocene
Xmp.dwc.GeologicalContext/dwc:earliestEraOrLowestErathem XmpText 8 Cenozoic
Xmp.dwc.GeologicalContext/dwc:earliestPeriodOrLowestSystem XmpText 7 Neogene
Xmp.dwc.GeologicalContext/dwc:formation XmpText 10 Notch Peak
Xmp.dwc.GeologicalContext/dwc:geologicalContextID XmpText 4 1234
Xmp.dwc.GeologicalContext/dwc:group XmpText 10 Notch Peak
Xmp.dwc.GeologicalContext/dwc:highestBiostratigraphicZone XmpText 8 Atlantic
Xmp.dwc.GeologicalContext/dwc:latestAgeOrHighestStage XmpText 6 Boreal
Xmp.dwc.GeologicalContext/dwc:latestEonOrHighestEonothem XmpText 11 Proterozoic
Xmp.dwc.GeologicalContext/dwc:latestEpochOrHighestSeries XmpText 14 Ibexian Series
Xmp.dwc.GeologicalContext/dwc:latestPeriodOrHighestSystem XmpText 8 Tertiary
Xmp.dwc.GeologicalContext/dwc:lithostratigraphicTerms XmpText 10 Supergroup
Xmp.dwc.GeologicalContext/dwc:lowestBiostratigraphicZone XmpText 6 Boreal
Xmp.dwc.GeologicalContext/dwc:member XmpText 8 Lava Dam
Xmp.dwc.Identification XmpText 0 type="Struct"
Xmp.dwc.Identification/dwc:dateIdentified XmpText 25 2011-01-27T00:17:00-18:00
Xmp.dwc.Identification/dwc:identificationID XmpText 4 1234
Xmp.dwc.Identification/dwc:identificationQualifier XmpText 14 aff. agrifolia
Xmp.dwc.Identification/dwc:identificationRemarks XmpText 21 Distinguished between
Xmp.dwc.Identification/dwc:identificationReferences XmpBag 1 Aves del
Xmp.dwc.Identification/dwc:identifiedBy XmpBag 1 James L.
Xmp.dwc.Identification/dwc:typeStatus XmpBag 1 holotype of
Xmp.dwc.Taxon XmpText 0 type="Struct"
Xmp.dwc.Taxon/dwc:acceptedNameUsage XmpText 14 Tamias minimus
Xmp.dwc.Taxon/dwc:acceptedNameUsageID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:class XmpText 10 Vertebrata
Xmp.dwc.Taxon/dwc:family XmpText 7 Felidae
Xmp.dwc.Taxon/dwc:genus XmpText 4 Puma
Xmp.dwc.Taxon/dwc:infraspecificEpithet XmpText 8 concolor
Xmp.dwc.Taxon/dwc:kingdom XmpText 8 Animalia
Xmp.dwc.Taxon/dwc:nameAccordingTo XmpText 21 McCranie, J. comments
Xmp.dwc.Taxon/dwc:nameAccordingToID XmpText 33 doi:10.1016/S0269-915X(97)80026-2
Xmp.dwc.Taxon/dwc:namePublishedIn XmpText 10 Pearson O.
Xmp.dwc.Taxon/dwc:namePublishedInID XmpText 29 http://hdl.handle.net/10199/7
Xmp.dwc.Taxon/dwc:namePublishedInYear XmpText 4 2059
Xmp.dwc.Taxon/dwc:nomenclaturalCode XmpText 4 ICBN
Xmp.dwc.Taxon/dwc:nomenclaturalStatus XmpText 11 nom. ambig.
Xmp.dwc.Taxon/dwc:order XmpText 8 Mammalia
Xmp.dwc.Taxon/dwc:originalNameUsage XmpText 22 Gasterosteus saltatrix
Xmp.dwc.Taxon/dwc:parentNameUsage XmpText 9 Rubiaceae
Xmp.dwc.Taxon/dwc:parentNameUsageID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:phylum XmpText 8 Chordata
Xmp.dwc.Taxon/dwc:scientificName XmpText 19 Ctenomys sociabilis
Xmp.dwc.Taxon/dwc:scientificNameAuthorship XmpText 12 (Torr.) J.T.
Xmp.dwc.Taxon/dwc:scientificNameID XmpText 35 urn:lsid:ipni.org:names:37829-1:1.3
Xmp.dwc.Taxon/dwc:specificEpithet XmpText 8 concolor
Xmp.dwc.Taxon/dwc:subgenus XmpText 4 Puma
Xmp.dwc.Taxon/dwc:taxonConceptID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:taxonID XmpText 36 8fa58e08-08de-4ac1-b69c-1235340b7001
Xmp.dwc.Taxon/dwc:taxonRank XmpText 10 subspecies
Xmp.dwc.Taxon/dwc:taxonRemarks XmpText 24 lang=en-us this name ...
Xmp.dwc.Taxon/dwc:taxonomicStatus XmpText 7 invalid
Xmp.dwc.Taxon/dwc:verbatimTaxonRank XmpText 12 Agamospecies
Xmp.dwc.Taxon/dwc:higherClassification XmpBag 1 Animalia;Chordata;Vertebrata;Mammalia;Theria;Eutheria
Xmp.dwc.Taxon/dwc:vernacularName LangAlt 2 lang="es-ES" Puma, lang="en-US" Cougar
Xmp.dwc.MeasurementOrFact XmpText 0 type="Struct"
Xmp.dwc.MeasurementOrFact/dwc:measurementAccuracy XmpText 4 0.01
Xmp.dwc.MeasurementOrFact/dwc:measurementDeterminedDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.MeasurementOrFact/dwc:measurementID XmpText 4 1234
Xmp.dwc.MeasurementOrFact/dwc:measurementMethod XmpText 20 barometric altimeter
Xmp.dwc.MeasurementOrFact/dwc:measurementRemarks XmpText 6 tip of
Xmp.dwc.MeasurementOrFact/dwc:measurementType XmpText 11 tail length
Xmp.dwc.MeasurementOrFact/dwc:measurementUnit XmpText 2 mm
Xmp.dwc.MeasurementOrFact/dwc:measurementValue XmpText 2 45
Xmp.dwc.MeasurementOrFact/dwc:measurementDeterminedBy XmpBag 1 Javier de
Xmp.dwc.ResourceRelationship XmpText 0 type="Struct"
Xmp.dwc.ResourceRelationship/dwc:relatedResourceID XmpText 4 1234
Xmp.dwc.ResourceRelationship/dwc:relationshipAccordingTo XmpText 14 Julie Woodruff
Xmp.dwc.ResourceRelationship/dwc:relationshipEstablishedDate XmpText 25 2013-01-27T00:00:00-06:00
Xmp.dwc.ResourceRelationship/dwc:relationshipOfResource XmpText 12 duplicate of
Xmp.dwc.ResourceRelationship/dwc:relationshipRemarks XmpText 19 pollinator captured
Xmp.dwc.ResourceRelationship/dwc:resourceID XmpText 4 1234
Xmp.dwc.ResourceRelationship/dwc:resourceRelationshipID XmpText 4 1234
Xmp.dc.language XmpBag 1 latin
Xmp.dc.rights LangAlt 2 lang="es-ES" CC Alan Pater, lang="en-US" Alan Pater CC
"""
]
stderr = [""] * 3
retval = [0] * 3

@ -193,7 +193,6 @@ class FileDecoratorBase(object):
tearDown() functions of the type it is called on with custom ones.
The new setUp() function performs the following steps:
- call the old setUp()
- create a file list in the decorated class with the name stored in
FILE_LIST_NAME (defaults to _files)
- iterate over all files, performing:
@ -201,6 +200,7 @@ class FileDecoratorBase(object):
of the decorated class)
- call self.setUp_file_action(expanded file name)
- append the result to the file list in the decorated class
- call the old setUp()
The function self.setUp_file_action is provided by this class and
is intended to be overridden by child classes to provide some
@ -208,9 +208,9 @@ class FileDecoratorBase(object):
The new tearDown() function performs the following steps:
- call the old tearDown() function
- iterate over all files in the file list:
- call self.tearDown_file_action(filename)
- call the old tearDown() function
The function self.tearDown_file_action can be overridden by child
classes. The default version provided by this class simply deletes
@ -252,17 +252,17 @@ class FileDecoratorBase(object):
the constructor of the decorator, passes them to expand_variables
and then to setUp_file_action:
>>> M.setUp()
calling MockCase.setUp()
setUp_file_action with one_file
setUp_file_action with two_file
setUp_file_action with three_file
calling MockCase.setUp()
The tearDown() function works accordingly:
>>> M.tearDown()
calling MockCase.tearDown()
tearDown_file_action with One_file
tearDown_file_action with Two_file
tearDown_file_action with Three_file
calling MockCase.tearDown()
Please note the capitalized "file" names (this is due to
setUp_file_action returning f.capitalized()) and that the old
@ -321,7 +321,6 @@ class FileDecoratorBase(object):
"""
def setUp(other):
old_setUp(other)
if hasattr(other, self.FILE_LIST_NAME):
raise TypeError(
"{!s} already has an attribute with the name {!s} which "
@ -334,6 +333,7 @@ class FileDecoratorBase(object):
getattr(other, self.FILE_LIST_NAME).append(
self.setUp_file_action(expanded_fname)
)
old_setUp(other)
return setUp
def setUp_file_action(self, expanded_file_name):
@ -368,9 +368,9 @@ class FileDecoratorBase(object):
"""
def tearDown(other):
old_tearDown(other)
for f in getattr(other, self.FILE_LIST_NAME):
self.tearDown_file_action(f)
old_tearDown(other)
return tearDown
@ -436,7 +436,7 @@ class CopyFiles(FileDecoratorBase):
self._files and then calls the original tearDown method.
This function will also complain if it is called without arguments or
without paranthesis, which is valid decorator syntax but is obviously a bug
without parenthesis, which is valid decorator syntax but is obviously a bug
in this case as it can result in tests not being run without a warning.
"""

Loading…
Cancel
Save