def test_make_shared_lib(self): eci = ExternalCompilationInfo( separate_module_sources = [''' RPY_EXTERN int get() { return 42; } int shouldnt_export() { return 43; }'''], ) neweci = eci.compile_shared_lib() assert len(neweci.libraries) == 1 try: import ctypes except ImportError: py.test.skip("Need ctypes for that test") assert ctypes.CDLL(neweci.libraries[0]).get() == 42 assert not hasattr(ctypes.CDLL(neweci.libraries[0]), 'shouldnt_export') assert not neweci.separate_module_sources assert not neweci.separate_module_files
def test_make_shared_lib(self): eci = ExternalCompilationInfo(separate_module_sources=[ ''' RPY_EXTERN int get() { return 42; } int shouldnt_export() { return 43; }''' ], ) neweci = eci.compile_shared_lib() assert len(neweci.libraries) == 1 try: import ctypes except ImportError: py.test.skip("Need ctypes for that test") assert ctypes.CDLL(neweci.libraries[0]).get() == 42 assert not hasattr(ctypes.CDLL(neweci.libraries[0]), 'shouldnt_export') assert not neweci.separate_module_sources assert not neweci.separate_module_files