beetbox / mediafile

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

Tests failing on NixOS #33

Closed lovesegfault closed 4 years ago

lovesegfault commented 4 years ago

While packaging mediafile 0.5.0 for NixOS I encountered a test failure:

python2.7-mediafile> ======================================================================
python2.7-mediafile> FAIL: test_known_fields (test.test_mediafile.MediaFieldTest)
python2.7-mediafile> ----------------------------------------------------------------------
python2.7-mediafile> Traceback (most recent call last):
python2.7-mediafile> File "/build/mediafile-0.5.0/test/test_mediafile.py", line 979, in test_known_fields
python2.7-mediafile> assertCountEqual(self, MediaFile.fields(), fields)
python2.7-mediafile> File "/nix/store/k948hw0if2rsyicvxgqa07mpfjqsr0gv-python2.7-six-1.15.0/lib/python2.7/site-packages/six.py", line 679, in assertCountEqual
python2.7-mediafile> return getattr(self, _assertCountEqual)(*args, **kwargs)
python2.7-mediafile> AssertionError: Element counts were not equal:
python2.7-mediafile> First has 1, Second has 0:  u'read_only_test'
python2.7-mediafile> ----------------------------------------------------------------------
python2.7-mediafile> Ran 436 tests in 1.072s
python2.7-mediafile> FAILED (failures=1)
python2.7-mediafile> Test failed: <unittest.runner.TextTestResult run=436 errors=0 failures=1>
python2.7-mediafile> error: Test failed: <unittest.runner.TextTestResult run=436 errors=0 failures=1>
builder for '/nix/store/av1l4k090h4sphyn8glj1nj3i1lcdh6a-python2.7-mediafile-0.5.0.drv' failed with exit code 1; last 10 log lines:
      return getattr(self, _assertCountEqual)(*args, **kwargs)
  AssertionError: Element counts were not equal:
  First has 1, Second has 0:  u'read_only_test'

  ----------------------------------------------------------------------
  Ran 436 tests in 1.072s

  FAILED (failures=1)
  Test failed: <unittest.runner.TextTestResult run=436 errors=0 failures=1>
  error: Test failed: <unittest.runner.TextTestResult run=436 errors=0 failures=1>

The tests seem to pass with Python 3.8, however

sampsyo commented 4 years ago

Thanks! Looks like a test wasn't properly cleaning up after itself. Any chance you could check whether the above change actually fixes it?

lovesegfault commented 4 years ago

It sure does!

python3.8-mediafile> Ran 436 tests in 0.881s
python3.8-mediafile> OK
python3.8-mediafile> Finished executing setuptoolsCheckPhase
python2.7-mediafile> Ran 436 tests in 1.003s
python2.7-mediafile> OK
python2.7-mediafile> Finished executing setuptoolsCheckPhase

Cheers!