functional-tests: Run png-region-of-interest only if exempi is found
If exempi is not available, the test fails with
----------------------------------- stdout -----------------------------------
tracker-extract returned: {
"@id": "file:///var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/test-extraction-data/images/png-region-of-interest.png",
"nmm:dlnaProfile": "PNG_TN",
"nmm:dlnaMime": "image/png",
"nfo:width": 128,
"nfo:height": 128,
"@type": [
"nfo:Image",
"nmm:Photo"
],
"@context": {
"nmm": "http://tracker.api.gnome.org/ontology/v3/nmm#",
"nfo": "http://tracker.api.gnome.org/ontology/v3/nfo#"
}
}
# TAP results for GenericExtractionTestCase
not ok 1 ests/test-extraction-data/images/png-region-of-interest.expe (__main__.GenericExtractionTestCase)
# Traceback (most recent call last):
# File "/usr/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
# yield
# File "/usr/lib/python3.10/unittest/case.py", line 591, in run
# self._callTestMethod(testMethod)
# File "/usr/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
# method()
# File "/var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/extractor-generic.py", line 102, in generic_test_extraction
# self.__assert_extraction_ok(jsonld)
# File "/var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/extractor-generic.py", line 122, in __assert_extraction_ok
# self.assert_extract_result_matches_spec(self.spec['metadata'], result, self.file_to_extract, self.descfile)
# File "/var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/fixtures.py", line 460, in assert_extract_result_matches_spec
# self.assertDictHasKey(result, prop,
# File "/var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/fixtures.py", line 415, in assertDictHasKey
# self.fail(self._formatMessage(msg, standardMsg))
# AssertionError: Missing: nfo:hasRegionOfInterest : Property 'nfo:hasRegionOfInterest' hasn't been extracted from file
# '/var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/test-extraction-data/images/png-region-of-interest.png'
# (requested on '/var/tmp/portage/app-misc/tracker-miners-3.4.2/work/tracker-miners-3.4.2/tests/functional-tests/test-extraction-data/images/png-region-of-interest.expected.json')
1..1