'Test creating a CPython extension module using pycc.'

def test_pycc_pymodule(self):

    self.skipTest('lack    of    environment    can    make    the    extension    crash')
    source = os.path.join(base_path, 'compile_with_pycc.py')
    modulename = 'test_pyext_legacy'
    out_modulename = os.path.join(self.tmpdir, (modulename + find_pyext_ending()))
    if os.path.exists(out_modulename):
        os.unlink(out_modulename)
    main(args=['--debug', '--python', '-o', out_modulename, source])
    with self.check_c_ext(self.tmpdir, modulename) as lib:
        res = lib.multi(123, 321)
        self.assertPreciseEqual(res, (123 * 321))
        res = lib.multf(987, 321)
        self.assertPreciseEqual(res, (987.0 * 321.0))
