One Hat Cyber Team
Your IP :
172.16.0.254
Server IP :
58.26.163.33
Server :
Windows NT DGPENSV2LPKMN 10.0 build 14393 (Windows Server 2016) AMD64
Server Software :
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.3.25
PHP Version :
7.3.25
Buat File
|
Buat Folder
Eksekusi
Dir :
C:
/
laragon
/
bin
/
python
/
python-3.10
/
Lib
/
ctypes
/
test
/
View File Name :
test_checkretval.py
import unittest from ctypes import * from ctypes.test import need_symbol class CHECKED(c_int): def _check_retval_(value): # Receives a CHECKED instance. return str(value.value) _check_retval_ = staticmethod(_check_retval_) class Test(unittest.TestCase): def test_checkretval(self): import _ctypes_test dll = CDLL(_ctypes_test.__file__) self.assertEqual(42, dll._testfunc_p_p(42)) dll._testfunc_p_p.restype = CHECKED self.assertEqual("42", dll._testfunc_p_p(42)) dll._testfunc_p_p.restype = None self.assertEqual(None, dll._testfunc_p_p(42)) del dll._testfunc_p_p.restype self.assertEqual(42, dll._testfunc_p_p(42)) @need_symbol('oledll') def test_oledll(self): self.assertRaises(OSError, oledll.oleaut32.CreateTypeLib2, 0, None, None) if __name__ == "__main__": unittest.main()