beetbox / mediafile

elegant audio file tagging
http://mediafile.readthedocs.io/
MIT License
97 stars 24 forks source link

Test failure on Arch Linux #34

Closed dmp1ce closed 3 years ago

dmp1ce commented 3 years ago

Building python-mediafile from the AUR I'm getting the following error. https://aur.archlinux.org/pkgbase/python-mediafile/#comment-758314

~/python-mediafile/src/python3 ~/python-mediafile/src ~/python-mediafile/src
..............................................................................................................................................................................................................................................................................................................................................................................F.....................................................................
======================================================================
FAIL: test_read_audio_properties (test.test_mediafile.WavpackTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-mediafile/src/python3/test/test_mediafile.py", line 442, in test_read_audio_properties
    self.assertEqual(getattr(mediafile, key), value)
AssertionError: 16 != 0

----------------------------------------------------------------------
Ran 436 tests in 0.983s

I tried naively changing the value to 16 on line 910 of the test but the test then fails for python2. I'm not sure what the right change is. https://github.com/beetbox/mediafile/blob/master/test/test_mediafile.py#L910

sampsyo commented 3 years ago

Interesting! That's pretty mysterious. My best guess is it's a Mutagen version issue—could you check which version of Mutagen is getting used in both settings?

dmp1ce commented 3 years ago

It looks like I have 1.45 for python3 and 1.43 for python2.

$ pacman -Qs mutagen
local/python-mutagen 1.45.0-1
    An audio metadata tag reader and writer (python library)
local/python2-mutagen 1.43.0-3
    An audio metadata tag reader and writer (python2 library)

Installed from the Arch Linux community repository (python3) and the AUR (python2).

$ yay -Ss mutagen
aur/python-mutagen-git 1.44.0.r14.g63b4aeb-1 (+0 0.00) 
    An audio metadata tag reader and writer (python library)
aur/mutagen.io-bin 0.11.2-1 (+1 0.00) 
    Code synchronization tool for remote development.
aur/python2-mutagen 1.43.0-3 (+14 0.99) (Installed)
    An audio metadata tag reader and writer (python2 library)
community/python-mutagen 1.45.0-1 (338.9 KiB 1.8 MiB) (Installed)
    An audio metadata tag reader and writer (python library)
sampsyo commented 3 years ago

Thanks!! Looks like Mutagen added support for bit depths on WavPack, which is awesome. I updated the test and bumped the required version of Mutagen to match.