home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_358 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.2 KB  |  29 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import unittest
  5. from ctypes import *
  6.  
  7. class X(Structure):
  8.     _fields_ = [
  9.         ('foo', c_int)]
  10.  
  11.  
  12. class TestCase(unittest.TestCase):
  13.     
  14.     def test_simple(self):
  15.         self.assertRaises(TypeError, delattr, c_int(42), 'value')
  16.  
  17.     
  18.     def test_chararray(self):
  19.         self.assertRaises(TypeError, delattr, c_char * 5(), 'value')
  20.  
  21.     
  22.     def test_struct(self):
  23.         self.assertRaises(TypeError, delattr, X(), 'foo')
  24.  
  25.  
  26. if __name__ == '__main__':
  27.     unittest.main()
  28.  
  29.