Wieland Hoffmann
3c366c7e36
test_imagelist: Fulfill the assumption that QObject.tagger is a FakeTagger object
...
Previously, these tests were failing if executed before test_filesystem or
test_format which already did the same:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_imagelist.py:25: in create_test_files
CoverArtImage(url='file://file1', data=create_fake_png(b'a')),
picard/coverart/image.py:151: in __init__
self.set_data(data)
picard/coverart/image.py:248: in set_data
self.datahash = DataHash(data, suffix=self.extension)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <picard.coverart.image.DataHash object at 0x7f367fe036a0>
data = b'\x89PNG\r\n\x1a\naaaaIHDR\x00\x00\x00d\x00\x00\x00da', prefix = 'picard', suffix = '.png'
def __init__(self, data, prefix='picard', suffix=''):
self._filename = None
_datafile_mutex.lock()
try:
m = md5()
m.update(data)
self._hash = m.hexdigest()
if self._hash not in _datafiles:
(fd, self._filename) = tempfile.mkstemp(prefix=prefix, suffix=suffix)
> QObject.tagger.register_cleanup(self.delete_file)
E AttributeError: type object 'QObject' has no attribute 'tagger'
picard/coverart/image.py:68: AttributeError
2018-10-23 17:32:50 +02:00