diff options
author | Mark Hammond <mhammond@skippinet.com.au> | 2002-01-07 02:11:43 (GMT) |
---|---|---|
committer | Mark Hammond <mhammond@skippinet.com.au> | 2002-01-07 02:11:43 (GMT) |
commit | e843e482cea527ebcb74d33d1b49623c756fee18 (patch) | |
tree | c912f49eceecff0a84feacb29049938b2cc49bd6 /Lib/test/test_unicode_file.py | |
parent | 6253a114a78a8998677c2a32ec4c449b9e1c723d (diff) | |
download | cpython-e843e482cea527ebcb74d33d1b49623c756fee18.zip cpython-e843e482cea527ebcb74d33d1b49623c756fee18.tar.gz cpython-e843e482cea527ebcb74d33d1b49623c756fee18.tar.bz2 |
Ensure Unicode filenames work with glob - they already do, but the test seems worth keeping.
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r-- | Lib/test/test_unicode_file.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py index 8b5757c..6cd965e 100644 --- a/Lib/test/test_unicode_file.py +++ b/Lib/test/test_unicode_file.py @@ -1,7 +1,7 @@ # Test some Unicode file name semantics # We dont test many operations on files other than # that their names can be used with Unicode characters. -import os +import os, glob from test_support import verify, TestSkipped, TESTFN_UNICODE try: @@ -57,6 +57,14 @@ if not os.path.isfile(TESTFN_UNICODE) or \ path, base = os.path.split(os.path.abspath(TESTFN_ENCODED)) 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() os.unlink(TESTFN_UNICODE) |