1690968587.0.4.27-16-g545a2a5.fix-test-suite-with-file-5-45.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. Subject: Fix test suite with file 5.45
  2. Origin: 0.4.27-16-g545a2a5 <https://github.com/ahupp/python-magic/commit/0.4.27-16-g545a2a5>
  3. Upstream-Author: Dominique Leuenberger <dimstar@opensuse.org>
  4. Date: Wed Aug 2 11:29:47 2023 +0200
  5. [ 12s] test/python_magic_test.py:53: in assert_values
  6. [ 12s] self.assertIn(value, expected_value)
  7. [ 12s] E AssertionError: 'PDF document, version 1.2, 2 page(s)' not found in ('PDF document, version 1.2', 'PDF document, version 1.2, 2 pages')
  8. --- a/test/libmagic_test.py
  9. +++ b/test/libmagic_test.py
  10. @@ -15,7 +15,7 @@
  11. filename = os.path.join(TESTDATA_DIR, 'test.pdf')
  12. expected_mime_type = 'application/pdf'
  13. expected_encoding = 'us-ascii'
  14. - expected_name = ('PDF document, version 1.2', 'PDF document, version 1.2, 2 pages')
  15. + expected_name = ('PDF document, version 1.2', 'PDF document, version 1.2, 2 pages', 'PDF document, version 1.2, 2 page(s)')
  16. def assert_result(self, result):
  17. self.assertEqual(result.mime_type, self.expected_mime_type)
  18. --- a/test/python_magic_test.py
  19. +++ b/test/python_magic_test.py
  20. @@ -108,7 +108,8 @@
  21. self.assert_values(m, {
  22. 'magic._pyc_': 'python 2.4 byte-compiled',
  23. 'test.pdf': ('PDF document, version 1.2',
  24. - 'PDF document, version 1.2, 2 pages'),
  25. + 'PDF document, version 1.2, 2 pages',
  26. + 'PDF document, version 1.2, 2 page(s)'),
  27. 'test.gz':
  28. ('gzip compressed data, was "test", from Unix, last '
  29. 'modified: Sun Jun 29 01:32:52 2008',