fix-buffer-test.patch 492 B

12345678910111213141516
  1. Subject: Fix test failing in python3
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Date: 2018-01-08
  4. Forwarded: yes
  5. --- a/test/libmagic_test.py
  6. +++ b/test/libmagic_test.py
  7. @@ -28,7 +28,7 @@
  8. def test_detect_from_content(self):
  9. with open(self.filename) as fobj:
  10. - result = magic.detect_from_content(fobj.read(4096))
  11. + result = magic.detect_from_content(fobj.read(4096).encode())
  12. self.assert_result(result)
  13. if __name__ == '__main__':