[testsuite] Use system_tests.path() in some test cases
This commit is contained in:
parent
4e32929956
commit
23e29e9527
@ -1,9 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
import os.path
|
||||
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
|
||||
|
||||
class TestFirstPoC(metaclass=system_tests.CaseMeta):
|
||||
|
||||
class TestFirstPoC(metaclass=CaseMeta):
|
||||
"""
|
||||
Regression test for the bug described in:
|
||||
https://github.com/Exiv2/exiv2/issues/283
|
||||
@ -16,16 +16,15 @@ class TestFirstPoC(metaclass=system_tests.CaseMeta):
|
||||
Here we want to also check that the two last lines of got_stderr have the expected_stderr
|
||||
"""
|
||||
|
||||
system_tests.check_no_ASAN_UBSAN_errors(self, i, command, got_stderr, expected_stderr)
|
||||
check_no_ASAN_UBSAN_errors(self, i, command, got_stderr, expected_stderr)
|
||||
self.assertListEqual(expected_stderr.splitlines(), got_stderr.splitlines()[-2:])
|
||||
|
||||
filename = os.path.join("$data_path", "pocIssue283.jpg")
|
||||
filename = path("$data_path/pocIssue283.jpg")
|
||||
commands = ["$exiv2 $filename"]
|
||||
stdout = [""]
|
||||
stderr = [
|
||||
"""$exiv2_exception_message """ + filename + """:
|
||||
"""$exiv2_exception_message $filename:
|
||||
$kerCorruptedMetadata
|
||||
"""]
|
||||
compare_stderr = check_no_ASAN_UBSAN_errors
|
||||
retval = [1]
|
||||
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
from system_tests import CaseMeta, path
|
||||
|
||||
|
||||
class CanonEOSM100(metaclass=system_tests.CaseMeta):
|
||||
class CanonEOSM100(metaclass=CaseMeta):
|
||||
|
||||
filename = "$data_path/exiv2-pr317.exv"
|
||||
filename = path("$data_path/exiv2-pr317.exv")
|
||||
commands = ["$exiv2 -pa --grep model/i $filename"]
|
||||
|
||||
stdout = ["""Exif.Image.Model Ascii 15 Canon EOS M100
|
||||
Exif.Canon.ModelID Long 1 EOS M100
|
||||
Exif.Photo.LensModel Ascii 29 EF-M15-45mm f/3.5-6.3 IS STM
|
||||
"""
|
||||
]
|
||||
]
|
||||
stderr = [""]
|
||||
retval = [0]
|
||||
retval = [0]
|
||||
|
||||
@ -1,17 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
import os.path
|
||||
from system_tests import DeleteFiles, CopyFiles, CaseMeta, path
|
||||
|
||||
|
||||
@system_tests.DeleteFiles("$xmpname")
|
||||
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
|
||||
class AdobeXmpNamespace(metaclass=system_tests.CaseMeta):
|
||||
@DeleteFiles("$xmpname")
|
||||
@CopyFiles("$data_path/exiv2-empty.jpg")
|
||||
class AdobeXmpNamespace(metaclass=CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/751"
|
||||
|
||||
filename = os.path.join("$data_path", "exiv2-empty_copy.jpg")
|
||||
xmpname = os.path.join("$data_path", "exiv2-empty_copy.xmp")
|
||||
filename = path("$data_path/exiv2-empty_copy.jpg")
|
||||
xmpname = path("$data_path/exiv2-empty_copy.xmp")
|
||||
|
||||
commands = [
|
||||
"""$exiv2 -v -M"reg imageapp orig/" -M "set Xmp.imageapp.uuid abcd" $filename""",
|
||||
|
||||
@ -1,19 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
import os
|
||||
from system_tests import DeleteFiles, CopyFiles, CaseMeta, path
|
||||
|
||||
|
||||
@system_tests.DeleteFiles("$xmpfile")
|
||||
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
|
||||
class WrongXmpTypeForNestedXmpKeys(metaclass=system_tests.CaseMeta):
|
||||
@DeleteFiles("$xmpfile")
|
||||
@CopyFiles("$data_path/exiv2-empty.jpg")
|
||||
class WrongXmpTypeForNestedXmpKeys(metaclass=CaseMeta):
|
||||
|
||||
url = "http://dev.exiv2.org/issues/$num"
|
||||
|
||||
num = 799
|
||||
cmdfile = os.path.join("$data_path", "bug$num.cmd")
|
||||
cmdfile = path("$data_path/bug$num.cmd")
|
||||
|
||||
filename_common = os.path.join("$data_path", "exiv2-empty_copy")
|
||||
filename_common = path("$data_path/exiv2-empty_copy")
|
||||
filename = "$filename_common.jpg"
|
||||
xmpfile = "$filename_common.xmp"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user