summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdam Hupp <adam@hupp.org>2021-01-15 14:43:15 -0800
committerAdam Hupp <adam@hupp.org>2021-01-15 14:43:15 -0800
commit665b7bdcc3df29039f64ed7d9e49fc77842942d9 (patch)
treed6c4f176720bd6e1e4d4275572942758589db33f /test
parentd61e3856696f8a88bc88b10eda6ac3b88710bc35 (diff)
downloadpython-magic-665b7bdcc3df29039f64ed7d9e49fc77842942d9.tar.gz
remove from_open_file, since its duplicative with from_descriptor and hasnt been released yet
Diffstat (limited to 'test')
-rwxr-xr-xtest/test.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/test/test.py b/test/test.py
index e333641..949c77e 100755
--- a/test/test.py
+++ b/test/test.py
@@ -83,15 +83,6 @@ class MagicTest(unittest.TestCase):
m.from_buffer(b'#!/usr/bin/env python\nprint("foo")')
in ("text/x-python", "text/x-script.python"))
- def test_open_file(self):
- if SKIP_FROM_DESCRIPTOR:
- self.skipTest("magic_descriptor is broken in this version of libmagic")
-
- m = magic.Magic(mime=True)
- filename = os.path.join(self.TESTDATA_DIR, "test.pdf")
- with open(filename) as f:
- self.assertEqual("application/pdf", m.from_open_file(f))
-
def test_mime_types(self):
dest = os.path.join(MagicTest.TESTDATA_DIR,
b'\xce\xbb'.decode('utf-8'))