

def create_pcap():
    '\n    Create a capture file from the test fixtures.\n    '
    tfile = tempfile.NamedTemporaryFile()
    if (sys.version_info[0] >= 3):
        capture = pickle.loads(base64.b64decode(fixture.TESTPCAP3))
    else:
        capture = pickle.loads(fixture.TESTPCAP2.decode('base64'))
    open(tfile.name, 'wb').write(capture)
    return tfile

dataset/ETHPy150Open kisom/pypcapfile/pcapfile/test/savefile_test.py create_pcap/original