[Python-checkins] CVS: python/dist/src/Lib/test test_funcattrs.py,1.9,1.10

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 17 Sep 2001 20:55:24 -0700


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

Modified Files:
	test_funcattrs.py 
Log Message:
Undo some (but not all) of the more lenient acceptance of
(AttributeError, TypeError) -- the leniency wasn't needed everywhere.


Index: test_funcattrs.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_funcattrs.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** test_funcattrs.py	2001/09/18 03:28:54	1.9
--- test_funcattrs.py	2001/09/18 03:55:22	1.10
***************
*** 33,37 ****
  try:
      del b.__dict__
! except (AttributeError, TypeError): pass
  else: raise TestFailed, 'del func.__dict__ expected TypeError'
  
--- 33,37 ----
  try:
      del b.__dict__
! except TypeError: pass
  else: raise TestFailed, 'del func.__dict__ expected TypeError'
  
***************
*** 39,43 ****
  try:
      b.__dict__ = None
! except (AttributeError, TypeError): pass
  else: raise TestFailed, 'func.__dict__ = None expected TypeError'
  
--- 39,43 ----
  try:
      b.__dict__ = None
! except TypeError: pass
  else: raise TestFailed, 'func.__dict__ = None expected TypeError'
  
***************
*** 109,113 ****
  try:
      F.a.__dict__ = (1, 2, 3)
! except (AttributeError, TypeError): pass
  else: raise TestFailed, 'expected TypeError'
  
--- 109,113 ----
  try:
      F.a.__dict__ = (1, 2, 3)
! except TypeError: pass
  else: raise TestFailed, 'expected TypeError'
  
***************
*** 122,126 ****
  try:
      F.a.__dict__ = d
! except (AttributeError, TypeError): pass
  else: raise TestFailed
  
--- 122,126 ----
  try:
      F.a.__dict__ = d
! except TypeError: pass
  else: raise TestFailed
  
***************
*** 172,186 ****
  try:
      del another.__dict__
! except (AttributeError, TypeError): pass
  else: raise TestFailed
  
  try:
      del another.func_dict
! except (AttributeError, TypeError): pass
  else: raise TestFailed
  
  try:
      another.func_dict = None
! except (AttributeError, TypeError): pass
  else: raise TestFailed
  
--- 172,186 ----
  try:
      del another.__dict__
! except TypeError: pass
  else: raise TestFailed
  
  try:
      del another.func_dict
! except TypeError: pass
  else: raise TestFailed
  
  try:
      another.func_dict = None
! except TypeError: pass
  else: raise TestFailed
  
***************
*** 219,223 ****
      try:
          setattr(obj, name, value)
!     except (AttributeError, TypeError):
          pass
      else:
--- 219,223 ----
      try:
          setattr(obj, name, value)
!     except TypeError:
          pass
      else:
***************
*** 225,229 ****
      try:
          delattr(obj, name)
!     except (AttributeError, TypeError):
          pass
      else:
--- 225,229 ----
      try:
          delattr(obj, name)
!     except TypeError:
          pass
      else: