Mailing List Archive

python/dist/src/Lib/test test_pep277.py,1.3,1.4
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv11411/Lib/test

Modified Files:
test_pep277.py
Log Message:
Add os.path.supports_unicode_filenames for all platforms,
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.



Index: test_pep277.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pep277.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_pep277.py 7 Oct 2002 17:27:15 -0000 1.3
--- test_pep277.py 8 Oct 2002 02:44:30 -0000 1.4
***************
*** 3,9 ****
import os, unittest
from test.test_support import TESTFN, TestSkipped, TestFailed, run_suite
! try:
! from nt import _getfullpathname
! except ImportError:
raise TestSkipped, "test works only on NT+"

--- 3,7 ----
import os, unittest
from test.test_support import TESTFN, TestSkipped, TestFailed, run_suite
! if not os.path.supports_unicode_filenames:
raise TestSkipped, "test works only on NT+"

***************
*** 25,29 ****
# an error if we can't remove it.
if os.path.exists(dirname):
! for fname in os.listdir(dirname):
os.unlink(os.path.join(dirname, fname))
os.rmdir(dirname)
--- 23,28 ----
# an error if we can't remove it.
if os.path.exists(dirname):
! # must pass unicode to os.listdir() so we get back unicode results.
! for fname in os.listdir(unicode(dirname)):
os.unlink(os.path.join(dirname, fname))
os.rmdir(dirname)
***************
*** 100,104 ****
f.write((filename + '\n').encode("utf-8"))
f.close()
! print repr(_getfullpathname(filename))
os.remove(filename)
os.chdir(oldwd)
--- 99,103 ----
f.write((filename + '\n').encode("utf-8"))
f.close()
! print repr(filename)
os.remove(filename)
os.chdir(oldwd)