[Python-checkins] python/dist/src/Lib/test test_descr.py,1.136,1.137

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Mon, 03 Jun 2002 23:10:39 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv19384

Modified Files:
	test_descr.py 
Log Message:
Test repair now that module.__init__ requires a name and initializes
__name__ and __doc__.


Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.136
retrieving revision 1.137
diff -C2 -d -r1.136 -r1.137
*** test_descr.py	3 Jun 2002 19:45:32 -0000	1.136
--- test_descr.py	4 Jun 2002 06:10:37 -0000	1.137
***************
*** 343,350 ****
      class M(type(sys)):
          pass
!     minstance = M()
      minstance.b = 2
      minstance.a = 1
!     vereq(dir(minstance), ['a', 'b'])
  
      class M2(M):
--- 343,351 ----
      class M(type(sys)):
          pass
!     minstance = M("m")
      minstance.b = 2
      minstance.a = 1
!     names = [x for x in dir(minstance) if x not in ["__name__", "__doc__"]]
!     vereq(names, ['a', 'b'])
  
      class M2(M):
***************
*** 353,357 ****
          __dict__ = property(getdict)
  
!     m2instance = M2()
      m2instance.b = 2
      m2instance.a = 1
--- 354,358 ----
          __dict__ = property(getdict)
  
!     m2instance = M2("m2")
      m2instance.b = 2
      m2instance.a = 1
***************
*** 819,824 ****
      MT = type(sys)
      class MM(MT):
!         def __init__(self):
!             MT.__init__(self)
          def __getattribute__(self, name):
              log.append(("getattr", name))
--- 820,825 ----
      MT = type(sys)
      class MM(MT):
!         def __init__(self, name):
!             MT.__init__(self, name)
          def __getattribute__(self, name):
              log.append(("getattr", name))
***************
*** 830,834 ****
              log.append(("delattr", name))
              MT.__delattr__(self, name)
!     a = MM()
      a.foo = 12
      x = a.foo
--- 831,835 ----
              log.append(("delattr", name))
              MT.__delattr__(self, name)
!     a = MM("a")
      a.foo = 12
      x = a.foo