def setup(self): path = os.path.join(os.path.dirname(__file__), 'test.pyclibcache') parser = CParser(['ctypes_test.h']) parser.write_cache(path) self.library = CLibrary(_ctypes_test.__file__, ['ctypes_test.h'], cache=path)