[Python-checkins] r86125 - in python/branches/py3k: Lib/test/test_unicode_file.py Misc/NEWS
brett.cannon
python-checkins at python.org
Tue Nov 2 20:28:00 CET 2010
Author: brett.cannon
Date: Tue Nov 2 20:27:59 2010
New Revision: 86125
Log:
Ditch some dead code in test_unicode_file.
Closes issue #10294. Thanks Stefan Behnel for the find.
Modified:
python/branches/py3k/Lib/test/test_unicode_file.py
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/test/test_unicode_file.py
==============================================================================
--- python/branches/py3k/Lib/test/test_unicode_file.py (original)
+++ python/branches/py3k/Lib/test/test_unicode_file.py Tue Nov 2 20:27:59 2010
@@ -51,22 +51,6 @@
self.assertIn(base, file_list)
- # Do as many "equivalancy' tests as we can - ie, check that although we
- # have different types for the filename, they refer to the same file.
- def _do_equivalent(self, filename1, filename2):
- # Note we only check "filename1 against filename2" - we don't bother
- # checking "filename2 against 1", as we assume we are called again with
- # the args reversed.
- self.assertTrue(type(filename1)!=type(filename2),
- "No point checking equivalent filenames of the same type")
- # stat and lstat should return the same results.
- self.assertEqual(os.stat(filename1),
- os.stat(filename2))
- self.assertEqual(os.lstat(filename1),
- os.lstat(filename2))
- # Copy/rename etc tests using equivalent filename
- self._do_copyish(filename1, filename2)
-
# Tests that copy, move, etc one file to another.
def _do_copyish(self, filename1, filename2):
# Should be able to rename the file using either name.
@@ -130,16 +114,6 @@
finally:
os.unlink(filename)
- def _test_equivalent(self, filename1, filename2):
- remove_if_exists(filename1)
- self.assertTrue(not os.path.exists(filename2))
- f = file(filename1, "w")
- f.close()
- try:
- self._do_equivalent(filename1, filename2)
- finally:
- os.unlink(filename1)
-
# The 'test' functions are unittest entry points, and simply call our
# _test functions with each of the filename combinations we wish to test
def test_single_files(self):
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Tue Nov 2 20:27:59 2010
@@ -243,6 +243,8 @@
Tests
-----
+- Issue #10294: Remove dead code form test_unicode_file.
+
- Issue #10123: Don't use non-ascii filenames in test_doctest tests. Add a
new test specific to unicode (non-ascii name and filename).
More information about the Python-checkins
mailing list