mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/python-magic: fix tests against file 5.47
Closes: https://bugs.gentoo.org/978316 Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
440f32d7cf
commit
bb58c2f73f
@@ -0,0 +1,29 @@
|
||||
https://bugs.gentoo.org/978316
|
||||
|
||||
Based on
|
||||
https://github.com/ahupp/python-magic/pull/363
|
||||
https://github.com/ahupp/python-magic/commit/a1fad4334ca36f3263dc9e30d6dbb01dec1eed71
|
||||
|
||||
diff --git a/test/python_magic_test.py b/test/python_magic_test.py
|
||||
index 624a443..67ae8f3 100755
|
||||
--- a/test/python_magic_test.py
|
||||
+++ b/test/python_magic_test.py
|
||||
@@ -93,7 +93,7 @@ class MagicTest(unittest.TestCase):
|
||||
'magic._pyc_': ('application/octet-stream', 'text/x-bytecode.python', 'application/x-bytecode.python'),
|
||||
'test.pdf': 'application/pdf',
|
||||
'test.gz': ('application/gzip', 'application/x-gzip'),
|
||||
- 'test.snappy.parquet': 'application/octet-stream',
|
||||
+ 'test.snappy.parquet': ('application/octet-stream', 'application/vnd.apache.parquet'),
|
||||
'text.txt': 'text/plain',
|
||||
b'\xce\xbb'.decode('utf-8'): 'text/plain',
|
||||
b'\xce\xbb': 'text/plain',
|
||||
@@ -123,7 +123,7 @@ class MagicTest(unittest.TestCase):
|
||||
': Sun Jun 29 01:32:52 2008, from Unix, truncated'
|
||||
),
|
||||
'text.txt': 'ASCII text',
|
||||
- 'test.snappy.parquet': ('Apache Parquet', 'Par archive data'),
|
||||
+ 'test.snappy.parquet': ('Apache Parquet', 'Apache Parquet file', 'Par archive data'),
|
||||
}, buf_equals_file=False)
|
||||
finally:
|
||||
del os.environ['TZ']
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -34,6 +34,7 @@ BDEPEND="
|
||||
PATCHES=(
|
||||
# upstream git backports
|
||||
"${FILESDIR}"/${P}-test.patch
|
||||
"${FILESDIR}"/${P}-fix-tests-against-file-5.47.patch
|
||||
)
|
||||
|
||||
distutils_enable_tests unittest
|
||||
|
||||
Reference in New Issue
Block a user