[issue10294] Lib/test/test_unicode_file.py contains dead code

Stefan Behnel report at bugs.python.org
Tue Nov 2 17:09:49 CET 2010


New submission from Stefan Behnel <scoder at users.sourceforge.net>:

Lib/test/test_unicode_file.py contains dead code:

    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)

Note how this refers to the now-gone "file()". The method is never used in the test code. Similarly, the "_do_equivalent()" method that it calls appears otherwise unused.

----------
components: Tests
messages: 120236
nosy: scoder
priority: normal
severity: normal
status: open
title: Lib/test/test_unicode_file.py contains dead code
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10294>
_______________________________________


More information about the Python-bugs-list mailing list