MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / addModTest

Function addModTest

tests/bash_tests/utils.py:654–673  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

652
653
654def addModTest(filename):
655 tmp = 'temp'
656 test_file = filename + '.iatst'
657 src_file = os.path.join(Config.data_dir, filename)
658 good_file = os.path.join(Config.data_dir, filename + '.iagd')
659 copyTestFile(filename, tmp)
660 stdin = """
661a Iptc.Application2.Headline The headline I am
662a Iptc.Application2.Keywords Yet another keyword
663m Iptc.Application2.DateCreated 2004-08-03
664a Iptc.Application2.Urgency 3
665m Iptc.Application2.SuppCategory "bla bla ba"
666a Iptc.Envelope.ModelVersion 2
667a Iptc.Envelope.TimeSent 14:41:00-05:00
668a Iptc.Application2.RasterizedCaption 230 42 34 2 90 84 23 146
669""".lstrip('\n').encode()
670 Executer('iptctest {tmp}', vars(), stdin=stdin)
671 e = Executer('iptcprint {tmp}', vars(), assert_returncode=None, decode_output=False)
672 save(e.stdout + b'\n', test_file)
673 return diffCheck(good_file, test_file, in_bytes=True)
674
675
676def extendedTest(filename):

Callers

nothing calls this directly

Calls 5

copyTestFileFunction · 0.85
ExecuterClass · 0.85
saveFunction · 0.85
diffCheckFunction · 0.85
encodeMethod · 0.45

Tested by

no test coverage detected