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

Method test_unicode_result_raw

test/python_magic_test.py:153–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

151 raise unittest.SkipTest("Magic file doesn't return expected type.")
152
153 def test_unicode_result_raw(self):
154 m = magic.Magic(raw=True)
155 src = os.path.join(MagicTest.TESTDATA_DIR, 'pgpunicode')
156 result = m.from_file(src)
157 if 'PGP' in result:
158 assert b'PGP\tSecret Sub-key -' == result.encode('utf-8')
159 else:
160 raise unittest.SkipTest("Magic file doesn't return expected type.")
161
162 def test_mime_encodings(self):
163 m = magic.Magic(mime_encoding=True)

Callers

nothing calls this directly

Calls 1

from_fileMethod · 0.95

Tested by

no test coverage detected