Commit 03f182a7 authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'sam/extract-tests-fix' into 'master'

Fix extractor tests with GStreamer >= 1.17.0

See merge request !227
parents cd31f5c7 767b65a1
Pipeline #191827 failed with stages
in 2 minutes and 56 seconds
......@@ -358,12 +358,8 @@ class TrackerExtractTestCase(ut.TestCase):
raise AssertionError("Expected a list property for %s, but got a %s: %s" % (
prop, type(result[prop]).__name__, result[prop]))
# FIXME: depending on the gstreamer version we link to, we may extract different
# nfo:hasHash and tracker:hasExternalReference. Those tags should probably be
# handled in separate tests that we can disable entirely with build-time checks.
# This check should be restored once we can thoroughly compare outputs again.
#self.assertEqual(len(expected_value), len(result[prop]),
# error_wrong_length % (prop, filename, spec_filename))
self.assertEqual(len(expected_value), len(result[prop]),
error_wrong_length % (prop, filename, spec_filename))
for i in range(0, len(expected_value)):
if isinstance(expected_value[i], dict):
......
......@@ -38,9 +38,9 @@ extractor_tests = [
'desktop/link-wikipedia-tracker'
]
# Gstreamer 1.18 introduced support for some additionnals
# Gstreamer 1.17/1.18 introduced support for some additional
# MusicBrainz tags
if gstreamer.found() and gstreamer.version() >= '1.18.0'
if gstreamer.found() and gstreamer.version() >= '1.17.0'
extractor_tests += 'audio/flac-musicbrainz'
extractor_tests += 'audio/vorbis-musicbrainz'
else
......
......@@ -12,7 +12,7 @@
"nfo:genre": "Rock",
"nfo:sampleRate": "44100",
"nie:comment": "no comment",
"nie:contentCreated": "2020-01-01",
"nie:contentCreated": "2020-01-01T00:00:00+00:00",
"nie:copyright": "none",
"nie:title": "track title",
"nmm:trackNumber": "12",
......@@ -43,7 +43,7 @@
]
},
"nmm:musicAlbumDisc": {
"@id": "urn:album-disc:awesome%20album:my%20album%20artist:2020-01-01",
"@id": "urn:album-disc:awesome%20album:my%20album%20artist:2020-01-01:Disc1",
"@type": "nmm:MusicAlbumDisc",
"nmm:setNumber": 1
},
......@@ -73,10 +73,12 @@
"tracker:referenceIdentifier": "dfgj-432-iu7"
}
],
"nfo:hasHash": {
"@type": "nfo:hasHash",
"nfo:hashAlgorithm": "chromaprint",
"nfo:hashValue": "123453215"
}
"nfo:hasHash": [
{
"@type": "nfo:hasHash",
"nfo:hashAlgorithm": "chromaprint",
"nfo:hashValue": "123453215"
}
]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment