Current Path : /usr/local/lib/python2.5/ctypes/test/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/local/lib/python2.5/ctypes/test/test_delattr.py |
import unittest from ctypes import * class X(Structure): _fields_ = [("foo", c_int)] class TestCase(unittest.TestCase): def test_simple(self): self.assertRaises(TypeError, delattr, c_int(42), "value") def test_chararray(self): self.assertRaises(TypeError, delattr, (c_char * 5)(), "value") def test_struct(self): self.assertRaises(TypeError, delattr, X(), "foo") if __name__ == "__main__": unittest.main()