[Python-checkins] CVS: python/dist/src/Lib/test test_pyexpat.py,1.4,1.5

Fred L. Drake python-dev@python.org
Fri, 22 Sep 2000 21:47:58 -0700


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

Modified Files:
	test_pyexpat.py 
Log Message:

Rename the public interface from "pyexpat" to "xml.parsers.expat".


Index: test_pyexpat.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pyexpat.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** test_pyexpat.py	2000/09/21 20:32:12	1.4
--- test_pyexpat.py	2000/09/23 04:47:56	1.5
***************
*** 4,8 ****
  # handler, are obscure and unhelpful.
          
! import pyexpat
                  
  class Outputter:
--- 4,8 ----
  # handler, are obscure and unhelpful.
          
! from xml.parsers import expat
                  
  class Outputter:
***************
*** 68,72 ****
  
  out = Outputter()
! parser = pyexpat.ParserCreate(namespace_separator='!')
  
  # Test getting/setting returns_unicode
--- 68,72 ----
  
  out = Outputter()
! parser = expat.ParserCreate(namespace_separator='!')
  
  # Test getting/setting returns_unicode
***************
*** 116,121 ****
  try:
      parser.Parse(data, 1)
! except pyexpat.error:
!     print '** Error', parser.ErrorCode, pyexpat.ErrorString(parser.ErrorCode)
      print '** Line', parser.ErrorLineNumber
      print '** Column', parser.ErrorColumnNumber
--- 116,121 ----
  try:
      parser.Parse(data, 1)
! except expat.error:
!     print '** Error', parser.ErrorCode, expat.ErrorString(parser.ErrorCode)
      print '** Line', parser.ErrorLineNumber
      print '** Column', parser.ErrorColumnNumber
***************
*** 123,127 ****
  
  # Try the parse again, this time producing Unicode output
! parser = pyexpat.ParserCreate(namespace_separator='!')
  parser.returns_unicode = 1
  
--- 123,127 ----
  
  # Try the parse again, this time producing Unicode output
! parser = expat.ParserCreate(namespace_separator='!')
  parser.returns_unicode = 1
  
***************
*** 130,135 ****
  try:
      parser.Parse(data, 1)
! except pyexpat.error:
!     print '** Error', parser.ErrorCode, pyexpat.ErrorString(parser.ErrorCode)
      print '** Line', parser.ErrorLineNumber
      print '** Column', parser.ErrorColumnNumber
--- 130,135 ----
  try:
      parser.Parse(data, 1)
! except expat.error:
!     print '** Error', parser.ErrorCode, expat.ErrorString(parser.ErrorCode)
      print '** Line', parser.ErrorLineNumber
      print '** Column', parser.ErrorColumnNumber
***************
*** 137,141 ****
  
  # Try parsing a file
! parser = pyexpat.ParserCreate(namespace_separator='!')
  parser.returns_unicode = 1
  
--- 137,141 ----
  
  # Try parsing a file
! parser = expat.ParserCreate(namespace_separator='!')
  parser.returns_unicode = 1
  
***************
*** 146,151 ****
  try:
      parser.ParseFile(file)
! except pyexpat.error:
!     print '** Error', parser.ErrorCode, pyexpat.ErrorString(parser.ErrorCode)
      print '** Line', parser.ErrorLineNumber
      print '** Column', parser.ErrorColumnNumber
--- 146,151 ----
  try:
      parser.ParseFile(file)
! except expat.error:
!     print '** Error', parser.ErrorCode, expat.ErrorString(parser.ErrorCode)
      print '** Line', parser.ErrorLineNumber
      print '** Column', parser.ErrorColumnNumber