[Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.25,1.26 test_exceptions.py,1.8,1.9 test_pkg.py,1.8,1.9

Barry Warsaw python-dev@python.org
Thu, 31 Aug 2000 23:53:54 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv23476

Modified Files:
	test_b1.py test_exceptions.py test_pkg.py 
Log Message:
Applying patch #100994 to allow JPython to use more of the standard
Python test suite.  Specifically,

- import time instead of strop in test_b1

- test for ClassType of exceptions using isinstance instead of
  equality in test_exceptions

- remove __builtins__ from dir() output in test_pkg

test_pkg output needs to be regenerated.



Index: test_b1.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** test_b1.py	2000/08/23 21:11:05	1.25
--- test_b1.py	2000/09/01 06:53:51	1.26
***************
*** 5,9 ****
  print '__import__'
  __import__('sys')
! __import__('strop')
  __import__('string')
  try: __import__('spamspam')
--- 5,9 ----
  print '__import__'
  __import__('sys')
! __import__('time')
  __import__('string')
  try: __import__('spamspam')

Index: test_exceptions.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_exceptions.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** test_exceptions.py	2000/07/11 17:52:59	1.8
--- test_exceptions.py	2000/09/01 06:53:51	1.9
***************
*** 20,24 ****
  def r(thing):
      test_raise_catch(thing)
!     if type(thing) == ClassType:
          print thing.__name__
      else:
--- 20,24 ----
  def r(thing):
      test_raise_catch(thing)
!     if isinstance(thing, ClassType):
          print thing.__name__
      else:

Index: test_pkg.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pkg.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** test_pkg.py	2000/08/17 22:54:59	1.8
--- test_pkg.py	2000/09/01 06:53:51	1.9
***************
*** 43,46 ****
--- 43,53 ----
      os.rmdir(x)
  
+ def fixdir(lst):
+     try:
+         lst.remove('__builtins__')
+     except ValueError:
+         pass
+     return lst
+ 
  # Helper to run a test
  
***************
*** 147,153 ****
  print dir()
  import t5
! print dir(t5)
! print dir(t5.foo)
! print dir(t5.string)
  """),
  
--- 154,160 ----
  print dir()
  import t5
! print fixdir(dir(t5))
! print fixdir(dir(t5.foo))
! print fixdir(dir(t5.string))
  """),
  
***************
*** 161,167 ****
  """
  import t6
! print dir(t6)
  from t6 import *
! print dir(t6)
  print dir()
  """),
--- 168,174 ----
  """
  import t6
! print fixdir(dir(t6))
  from t6 import *
! print fixdir(dir(t6))
  print dir()
  """),