def create_pcap():
tfile = tempfile.NamedTemporaryFile()<EOL>if sys.version_info[<NUM_LIT:0>] >= <NUM_LIT:3>:  <EOL><INDENT>capture = pickle.loads(base64.b64decode(fixture.TESTPCAP3))<EOL><DEDENT>else:  <EOL><INDENT>capture = pickle.loads(fixture.TESTPCAP2.decode('<STR_LIT>'))<EOL><DEDENT>with open(tfile.name, '<STR_LIT:wb>') as f:<EOL><INDENT>f.write(capture)<EOL><DEDENT>return tfile<EOL>
Create a capture file from the test fixtures.