def create_pcap():
    tfile = tempfile.NamedTemporaryFile()
    if sys.version_info[0] >= 3:  # python3
        capture = pickle.loads(base64.b64decode(fixture.TESTPCAP3))
    else:  # python2 unsupported pickle protocol: 3
        capture = pickle.loads(fixture.TESTPCAP2.decode('base64'))
    open(tfile.name, 'wb').write(capture)
    return tfile
Create a capture file from the test fixtures.
dataset/ETHPy150Open kisom/pypcapfile/pcapfile/test/savefile_test.py/create_pcap