test_issue28 is flaky on some Debian buildds and on ppc64el
It seems this test might be resource-constrained and fails on machines with low resources, like Debian's ppc64el buildds and some amd64 buildds:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1027403
The actual failure is:
=================================== FAILURES ===================================
_________________________________ test_issue28 _________________________________
cachedir = PosixPath('/tmp/pytest-of-debci/pytest-0/test_issue280/cache')
musicdir = PosixPath('/tmp/pytest-of-debci/pytest-0/test_issue280/music')
caplog = <_pytest.logging.LogCaptureFixture object at 0x7f705a5efad0>
def test_issue28(cachedir, musicdir, caplog):
"""Test metalfinder continues running if a file passed through get_artist()
raises an exception"""
caplog.set_level(logging.WARNING)
for filename in ['no_header.flac', 'no_artist.flac', 'arch_enemy.flac']:
_ = move_testfile(filename, musicdir)
artist_list = mfs.scan_wrapper(str(musicdir), str(cachedir))
assert artist_list == {'Arch Enemy'}
> assert NO_ARTIST_ERROR in caplog.records[0].args[1]
E assert "<class 'KeyError'>: 'artist'" in "<class 'mutagen.flac.FLACNoHeaderError'>: '/tmp/pytest-of-debci/pytest-0/test_issue280/music/no_header.flac' is not a valid FLAC file"
tests/test_scan.py:170: AssertionError
------------------------------ Captured log call -------------------------------
WARNING root:scan.py:38 Could not scan file /tmp/pytest-of-debci/pytest-0/test_issue280/music/no_header.flac, skipping it: <class 'mutagen.flac.FLACNoHeaderError'>: '/tmp/pytest-of-debci/pytest-0/test_issue280/music/no_header.flac' is not a valid FLAC file
WARNING root:scan.py:38 Could not scan file /tmp/pytest-of-debci/pytest-0/test_issue280/music/no_artist.flac, skipping it: <class 'KeyError'>: 'artist'
=============================== warnings summary ===============================
../../../../usr/lib/python3/dist-packages/feedgenerator/django/utils/encoding.py:198
/usr/lib/python3/dist-packages/feedgenerator/django/utils/encoding.py:198: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
DEFAULT_LOCALE_ENCODING = locale.getdefaultlocale()[1] or 'ascii'
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html