[Python-checkins] cpython: Issue #15478: Fix test_pep277 on Windows

victor.stinner python-checkins at python.org
Mon Nov 5 01:28:17 CET 2012


http://hg.python.org/cpython/rev/11ea4eb79e9d
changeset: 80260:11ea4eb79e9d
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Nov 05 01:28:28 2012 +0100
summary:
 Issue #15478: Fix test_pep277 on Windows
os.listdir() now returns the original path in OSError.filename (on any
platform), even if "*.*" was added to the path (on Windows).
files:
 Lib/test/test_pep277.py | 4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_pep277.py b/Lib/test/test_pep277.py
--- a/Lib/test/test_pep277.py
+++ b/Lib/test/test_pep277.py
@@ -99,10 +99,6 @@
 with self.assertRaises(expected_exception) as c:
 fn(filename)
 exc_filename = c.exception.filename
- # listdir may append a wildcard to the filename
- if fn is os.listdir and sys.platform == 'win32':
- exc_filename, _, wildcard = exc_filename.rpartition(os.sep)
- self.assertEqual(wildcard, '*.*')
 if check_filename:
 self.assertEqual(exc_filename, filename, "Function '%s(%a) failed "
 "with bad filename in the exception: %a" %
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /