def test_dos_header_exception_small_data(self):
"""pefile should fail parsing 64 bytes of invalid data
(missing DOS header).
"""
# Generate 64 bytes of zeroes
data = b'\0' * (64)
# Attempt to parse data and verify PE header a PEFormatError exception
# is thrown.
self.assertRaises(pefile.PEFormatError, pefile.PE, data=data)
评论列表
文章目录