def test_packet_valid(self):
        packet = self.capfile.packets[0].raw()

        self.assertEqual(int(bytearray(packet)[14]), 69, 'invalid packet')

        for packet in self.capfile.packets:
            for field in ['capture_len', 'timestamp', 'timestamp_ms',
                          'packet', 'header', 'packet_len']:
                self.assertTrue(hasattr(packet, field), 'invalid packet!')
Make sure raw packets load properly.
dataset/ETHPy150Open kisom/pypcapfile/pcapfile/test/savefile_test.py/TestCase.test_packet_valid