def test_pycc_bitcode(self):
    '\n        Test creating a LLVM bitcode file using pycc.\n        '
    modulename = os.path.join(base_path, 'compile_with_pycc')
    bitcode_modulename = os.path.join(self.tmpdir, 'test_bitcode_legacy.bc')
    if os.path.exists(bitcode_modulename):
        os.unlink(bitcode_modulename)
    main(args=['--debug', '--llvm', '-o', bitcode_modulename, (modulename + '.py')])
    with open(bitcode_modulename, 'rb') as f:
        bc = f.read()
    bitcode_wrapper_magic = b'\xde\xc0\x17\x0b'
    bitcode_magic = b'BC\xc0\xde'
    self.assertTrue(bc.startswith((bitcode_magic, bitcode_wrapper_magic)), bc)
Test creating a LLVM bitcode file using pycc.
def test_pycc_bitcode(self):
    '\n        \n        '
    modulename = os.path.join(base_path, 'compile_with_pycc')
    bitcode_modulename = os.path.join(self.tmpdir, 'test_bitcode_legacy.bc')
    if os.path.exists(bitcode_modulename):
        os.unlink(bitcode_modulename)
    main(args=['--debug', '--llvm', '-o', bitcode_modulename, (modulename + '.py')])
    with open(bitcode_modulename, 'rb') as f:
        bc = f.read()
    bitcode_wrapper_magic = b'\xde\xc0\x17\x0b'
    bitcode_magic = b'BC\xc0\xde'
    self.assertTrue(bc.startswith((bitcode_magic, bitcode_wrapper_magic)), bc)