summaryrefslogtreecommitdiff
path: root/Lib/test/test_unicode_file.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2010-11-02 19:27:59 +0000
committerBrett Cannon <bcannon@gmail.com>2010-11-02 19:27:59 +0000
commit52862d4594747277e47d20e19ac7e3064f239886 (patch)
treee98db8fadd3bf04f9cf39a9badfa88dd11bbad34 /Lib/test/test_unicode_file.py
parent4afc2fffc23a71663cb8c1f7c1ca1752a57c33e1 (diff)
downloadcpython-52862d4594747277e47d20e19ac7e3064f239886.tar.gz
Ditch some dead code in test_unicode_file.
Closes issue #10294. Thanks Stefan Behnel for the find.
Diffstat (limited to 'Lib/test/test_unicode_file.py')
-rw-r--r--Lib/test/test_unicode_file.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/Lib/test/test_unicode_file.py b/Lib/test/test_unicode_file.py
index 76eb11ef1d..6c2011ace8 100644
--- a/Lib/test/test_unicode_file.py
+++ b/Lib/test/test_unicode_file.py
@@ -51,22 +51,6 @@ class TestUnicodeFiles(unittest.TestCase):
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 @@ class TestUnicodeFiles(unittest.TestCase):
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):