home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / digsby_setup.exe / lib / protocols / tests / test_twisted.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-02-26  |  2.7 KB  |  71 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from unittest import TestCase, makeSuite, TestSuite
  5. from protocols import *
  6. import protocols.twisted_support as protocols
  7. from twisted.python.components import Interface
  8.  
  9. class IA(Interface):
  10.     pass
  11.  
  12.  
  13. class IB(IA):
  14.     pass
  15.  
  16.  
  17. class IPure(Interface):
  18.     pass
  19.  
  20. from checks import InstanceImplementationChecks, makeClassTests, ProviderChecks
  21. from checks import makeInstanceTests, SimpleAdaptiveChecks
  22.  
  23. class Picklable:
  24.     pass
  25.  
  26.  
  27. class NewStyle(object):
  28.     pass
  29.  
  30.  
  31. class BasicChecks(SimpleAdaptiveChecks, InstanceImplementationChecks):
  32.     IA = IA
  33.     IB = IB
  34.     Interface = Interface
  35.     IPure = IPure
  36.  
  37.  
  38. class InstanceChecks(ProviderChecks):
  39.     IA = IA
  40.     IB = IB
  41.     Interface = Interface
  42.     IPure = IPure
  43.  
  44. TestClasses = makeClassTests(BasicChecks)
  45. TestClasses += makeInstanceTests(InstanceChecks, Picklable, NewStyle)
  46.  
  47. class IB(protocols.Interface):
  48.     advise(protocolExtends = [
  49.         IA])
  50.  
  51.  
  52. class BasicChecks(InstanceImplementationChecks):
  53.     IA = IA
  54.     IB = IB
  55.     Interface = Interface
  56.     IPure = IPure
  57.  
  58.  
  59. class InstanceChecks(ProviderChecks):
  60.     IA = IA
  61.     IB = IB
  62.     Interface = Interface
  63.     IPure = IPure
  64.  
  65. TestClasses += makeClassTests(BasicChecks)
  66. TestClasses += makeInstanceTests(InstanceChecks, Picklable, NewStyle)
  67.  
  68. def test_suite():
  69.     return []([ makeSuite(t, 'check') for t in TestClasses ])
  70.  
  71.