[Python-checkins] python/dist/src/Lib/test regrtest.py,1.85,1.86 test_fcntl.py,1.22,1.23 test_file.py,1.8,1.9 test_mhlib.py,1.6,1.7 test_os.py,1.10,1.11 test_popen2.py,1.5,1.6

loewis@users.sourceforge.net loewis@users.sourceforge.net
Mon, 10 Jun 2002 23:22:33 -0700


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

Modified Files:
	regrtest.py test_fcntl.py test_file.py test_mhlib.py 
	test_os.py test_popen2.py 
Log Message:
Patch #488073: AtheOS port.


Index: regrtest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** regrtest.py	7 Jun 2002 15:17:03 -0000	1.85
--- regrtest.py	11 Jun 2002 06:22:30 -0000	1.86
***************
*** 722,725 ****
--- 722,753 ----
          test_zlib
          """,
+     'atheos':
+ 	"""
+ 	test_al 
+ 	test_cd 
+ 	test_cl 
+ 	test_curses 
+ 	test_dl 
+ 	test_email_codecs
+ 	test_gdbm 
+ 	test_gl 
+ 	test_imgfile 
+ 	test_largefile 
+ 	test_linuxaudiodev
+ 	test_locale 
+ 	test_mhlib
+ 	test_mmap 
+ 	test_mpz 
+ 	test_nis 
+ 	test_poll
+ 	test_popen2
+ 	test_resource
+ 	test_socket_ssl 
+ 	test_socketserver 
+ 	test_sunaudiodev
+ 	test_unicode_file
+ 	test_winreg
+ 	test_winsound
+ 	""",
  }
  

Index: test_fcntl.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_fcntl.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** test_fcntl.py	13 May 2002 14:58:02 -0000	1.22
--- test_fcntl.py	11 Jun 2002 06:22:30 -0000	1.23
***************
*** 18,21 ****
--- 18,24 ----
      start_len = "qq"
  
+ if sys.platform.startswith('atheos'):
+     start_len = "qq"
+ 
  if sys.platform in ('netbsd1', 'Darwin1.2', 'darwin',
                      'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',

Index: test_file.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_file.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_file.py	1 Apr 2002 18:59:20 -0000	1.8
--- test_file.py	11 Jun 2002 06:22:30 -0000	1.9
***************
*** 1,2 ****
--- 1,3 ----
+ import sys
  import os
  from array import array
***************
*** 89,93 ****
      raise TestFailed, 'file.closed should be true'
  
! for methodname in ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ]:
      method = getattr(f, methodname)
      try:
--- 90,98 ----
      raise TestFailed, 'file.closed should be true'
  
! methods = ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline', 'readlines', 'seek', 'tell', 'truncate', 'write', 'xreadlines' ]
! if sys.platform.startswith('atheos'):
!     methods.remove('truncate')
! 
! for methodname in methods:
      method = getattr(f, methodname)
      try:

Index: test_mhlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_mhlib.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_mhlib.py	24 Oct 2001 20:32:02 -0000	1.6
--- test_mhlib.py	11 Jun 2002 06:22:30 -0000	1.7
***************
*** 13,17 ****
  import mhlib
  
! if sys.platform.startswith("win") or sys.platform=="riscos":
      raise TestSkipped("test_mhlib skipped on %s -- "%sys.platform +
                        "too many Unix assumptions")
--- 13,17 ----
  import mhlib
  
! if sys.platform.startswith("win") or sys.platform=="riscos" or sys.platform.startswith("atheos"):
      raise TestSkipped("test_mhlib skipped on %s -- "%sys.platform +
                        "too many Unix assumptions")

Index: test_os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_os.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_os.py	16 Apr 2002 01:27:44 -0000	1.10
--- test_os.py	11 Jun 2002 06:22:30 -0000	1.11
***************
*** 140,144 ****
  
          import statvfs
!         result = os.statvfs(self.fname)
  
          # Make sure direct access works
--- 140,150 ----
  
          import statvfs
!         try:
!             result = os.statvfs(self.fname)
!         except OSError, e:
!             # On AtheOS, glibc always returns ENOSYS
!             import errno
!             if e.errno == errno.ENOSYS:
!                 return
  
          # Make sure direct access works

Index: test_popen2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_popen2.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_popen2.py	30 Jan 2001 18:35:32 -0000	1.5
--- test_popen2.py	11 Jun 2002 06:22:30 -0000	1.6
***************
*** 15,23 ****
  def main():
      print "Test popen2 module:"
!     if sys.platform[:4] == 'beos' and __name__ != '__main__':
          #  Locks get messed up or something.  Generally we're supposed
          #  to avoid mixing "posix" fork & exec with native threads, and
          #  they may be right about that after all.
!         raise TestSkipped, "popen2() doesn't work during import on BeOS"
      try:
          from os import popen
--- 15,24 ----
  def main():
      print "Test popen2 module:"
!     if (sys.platform[:4] == 'beos' or sys.platform[:6] == 'atheos') \
!            and __name__ != '__main__':
          #  Locks get messed up or something.  Generally we're supposed
          #  to avoid mixing "posix" fork & exec with native threads, and
          #  they may be right about that after all.
!         raise TestSkipped, "popen2() doesn't work during import on " + sys.platform
      try:
          from os import popen