[Python-checkins] python/dist/src/Lib/test test_pep277.py,1.6,1.7

mhammond@users.sourceforge.net mhammond@users.sourceforge.net
Tue, 15 Jul 2003 20:46:40 -0700


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

Modified Files:
	test_pep277.py 
Log Message:
Prevent failure on the mac, where "mbcs" is not the file system
encoding.  Use sys.getfilesystemencoding().


Index: test_pep277.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pep277.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_pep277.py	1 May 2003 17:45:44 -0000	1.6
--- test_pep277.py	16 Jul 2003 03:46:38 -0000	1.7
***************
*** 1,5 ****
  # Test the Unicode versions of normal file functions
  # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
! import os, unittest
  from test import test_support
  if not os.path.supports_unicode_filenames:
--- 1,5 ----
  # Test the Unicode versions of normal file functions
  # open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
! import sys, os, unittest
  from test import test_support
  if not os.path.supports_unicode_filenames:
***************
*** 80,84 ****
          f1 = os.listdir(test_support.TESTFN)
          f1.sort()
!         f2 = os.listdir(unicode(test_support.TESTFN,"mbcs"))
          f2.sort()
          print f1
--- 80,85 ----
          f1 = os.listdir(test_support.TESTFN)
          f1.sort()
!         f2 = os.listdir(unicode(test_support.TESTFN,
!                                 sys.getfilesystemencoding()))
          f2.sort()
          print f1