MCPcopy Create free account
hub / github.com/ahupp/python-magic / test_detect_from_fobj

Method test_detect_from_fobj

test/libmagic_test.py:29–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 self.assert_result(result)
28
29 def test_detect_from_fobj(self):
30
31 if SKIP_FROM_DESCRIPTOR:
32 self.skipTest("magic_descriptor is broken in this version of libmagic")
33
34
35 with open(self.filename) as fobj:
36 result = magic.detect_from_fobj(fobj)
37 self.assert_result(result)
38
39 def test_detect_from_content(self):
40 # differ from upstream by opening file in binary mode,

Callers

nothing calls this directly

Calls 2

assert_resultMethod · 0.95
openFunction · 0.85

Tested by

no test coverage detected