summaryrefslogtreecommitdiff
path: root/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2018-08-18 03:04:13 +0200
committerPatrice Clement <monsieurp@gentoo.org>2018-08-23 10:17:07 +0200
commit7de54d8bb0adfbc64a5d291416e58884d3096fb8 (patch)
treeea2d33f42a3d01ba75c567e713925be378de75ea /dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch
parenta6868ac7d5a6a3bac11adfc9bc6850c0c1321879 (diff)
downloadgentoo-7de54d8bb0adfbc64a5d291416e58884d3096fb8.tar.gz
gentoo-7de54d8bb0adfbc64a5d291416e58884d3096fb8.tar.bz2
gentoo-7de54d8bb0adfbc64a5d291416e58884d3096fb8.zip
dev-python/python-magic: add Python 3.7, PyPy{,3}, fix tests.
* Tests didn't work with recent versions of file. Provide patches that have been merged upstream. * Fix dependencies, DEPEND=${DEPEND} was a typo. * EAPI=7. Package-Manager: Portage-2.3.45, Repoman-2.3.10 Closes: https://github.com/gentoo/gentoo/pull/9607
Diffstat (limited to 'dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch')
-rw-r--r--dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch b/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch
new file mode 100644
index 000000000000..d48637139e2f
--- /dev/null
+++ b/dev-python/python-magic/files/python-magic-0.4.15-fix-gzip-test.patch
@@ -0,0 +1,19 @@
+commit e83487a20bacd4f9b33d0478861671bf79468f59
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Mon Aug 13 12:15:13 2018 +0200
+
+ Allow x-gzip as MIME type for gzip files, fixes #96
+
+diff --git a/test/test.py b/test/test.py
+index e29335f..e3ee703 100755
+--- a/test/test.py
++++ b/test/test.py
+@@ -54,7 +54,7 @@ class MagicTest(unittest.TestCase):
+ self.assert_values(m, {
+ 'magic._pyc_': 'application/octet-stream',
+ 'test.pdf': 'application/pdf',
+- 'test.gz': 'application/gzip',
++ 'test.gz': ('application/gzip', 'application/x-gzip'),
+ 'text.txt': 'text/plain',
+ b'\xce\xbb'.decode('utf-8'): 'text/plain',
+ b'\xce\xbb': 'text/plain',