|
@@ -0,0 +1,32 @@
|
|
|
+Subject: Adjust test suite for changes in file 5.39
|
|
|
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
|
|
|
+Date: 2020-11-26
|
|
|
+Bug-Debian: https://bugs.debian.org/975784
|
|
|
+Forwarded: no
|
|
|
+
|
|
|
+ MIME-type for python was added/changed in FILE5_38-36-geb373e43
|
|
|
+ Detection of trunucated files was added in FILE5_38-106-g0c7cd78b
|
|
|
+
|
|
|
+--- a/test/test.py
|
|
|
++++ b/test/test.py
|
|
|
+@@ -34,9 +34,9 @@
|
|
|
+ def test_from_buffer_str_and_bytes(self):
|
|
|
+ m = magic.Magic(mime=True)
|
|
|
+ s = '#!/usr/bin/env python\nprint("foo")'
|
|
|
+- self.assertEqual("text/x-python", m.from_buffer(s))
|
|
|
++ self.assertEqual("text/x-script.python", m.from_buffer(s))
|
|
|
+ b = b'#!/usr/bin/env python\nprint("foo")'
|
|
|
+- self.assertEqual("text/x-python", m.from_buffer(b))
|
|
|
++ self.assertEqual("text/x-script.python", m.from_buffer(b))
|
|
|
+
|
|
|
+
|
|
|
+ def test_open_file(self):
|
|
|
+@@ -50,7 +50,7 @@
|
|
|
+ try:
|
|
|
+ m = magic.Magic(mime=True)
|
|
|
+ self.assert_values(m, {
|
|
|
+- 'magic._pyc_': 'application/octet-stream',
|
|
|
++ 'magic._pyc_': 'text/x-bytecode.python',
|
|
|
+ 'test.pdf': 'application/pdf',
|
|
|
+ 'test.gz': 'application/gzip',
|
|
|
+ 'text.txt': 'text/plain',
|