[ctypes-commit] ctypes/ctypes/test test_loading.py,1.1.2.3,1.1.2.4
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-01-26 19:59:53
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25404 Modified Files: Tag: branch_1_0 test_loading.py Log Message: Adapt to changes in library loading. Index: test_loading.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/test_loading.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** test_loading.py 23 Jan 2006 12:25:49 -0000 1.1.2.3 --- test_loading.py 26 Jan 2006 19:59:45 -0000 1.1.2.4 *************** *** 7,11 **** unknowndll = "xxrandomnamexx" ! def test_LoadLibrary(self): if os.name == "nt": name = "msvcrt" --- 7,11 ---- unknowndll = "xxrandomnamexx" ! def test_load(self): if os.name == "nt": name = "msvcrt" *************** *** 16,35 **** else: name = "libc.so.6" ! cdll.LoadLibrary(name) ! self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll) ! def test_LoadLibraryVersion(self): version = "6" name = "c" - cdll.LoadLibraryVersion(name, version) if sys.platform == "linux2": # linux uses version, libc 9 should not exist ! self.assertRaises(OSError, cdll.LoadLibraryVersion, name, "9") ! self.assertRaises(OSError, cdll.LoadLibraryVersion, self.unknowndll, "") ! def test_find(self): ! name = "c" ! cdll.find(name, False) ! self.assertRaises(OSError, cdll.find, self.unknowndll) if __name__ == "__main__": --- 16,36 ---- else: name = "libc.so.6" ! cdll.load(name) ! self.assertRaises(OSError, cdll.load, self.unknowndll) ! def test_load_version(self): version = "6" name = "c" if sys.platform == "linux2": + cdll.load_version(name, version) # linux uses version, libc 9 should not exist ! self.assertRaises(OSError, cdll.load_version, name, "9") ! self.assertRaises(OSError, cdll.load_version, self.unknowndll, "") ! if os.name == "posix": ! def test_find(self): ! name = "c" ! cdll.find(name) ! self.assertRaises(OSError, cdll.find, self.unknowndll) if __name__ == "__main__": |