[Python-checkins] CVS: python/dist/src/Lib/test test_unicode_file.py,1.2,1.3
Mark Hammond
mhammond@users.sourceforge.net
Sun, 06 Jan 2002 18:11:45 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv25515
Modified Files:
test_unicode_file.py
Log Message:
Ensure Unicode filenames work with glob - they already do, but the test seems worth keeping.
Index: test_unicode_file.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode_file.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_unicode_file.py 2001/09/05 17:09:48 1.2
--- test_unicode_file.py 2002/01/07 02:11:43 1.3
***************
*** 2,6 ****
# We dont test many operations on files other than
# that their names can be used with Unicode characters.
! import os
from test_support import verify, TestSkipped, TESTFN_UNICODE
--- 2,6 ----
# We dont test many operations on files other than
# that their names can be used with Unicode characters.
! import os, glob
from test_support import verify, TestSkipped, TESTFN_UNICODE
***************
*** 58,61 ****
--- 58,69 ----
if base not in os.listdir(path):
print "Filename did not appear in os.listdir()"
+ path, base = os.path.split(os.path.abspath(TESTFN_UNICODE))
+ if base not in os.listdir(path):
+ print "Unicode filename did not appear in os.listdir()"
+
+ if os.path.abspath(TESTFN_ENCODED) != os.path.abspath(glob.glob(TESTFN_ENCODED)[0]):
+ print "Filename did not appear in glob.glob()"
+ if os.path.abspath(TESTFN_UNICODE) != os.path.abspath(glob.glob(TESTFN_UNICODE)[0]):
+ print "Unicode filename did not appear in glob.glob()"
f.close()