diff options
author | Raymond Hettinger <python@rcn.com> | 2003-09-02 05:42:02 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-09-02 05:42:02 (GMT) |
commit | eeca37e0b5a86bc8113f9f51cace145a71c56dd4 (patch) | |
tree | 7fdea651897ba52a430720ab4d11a44e140094dd /Lib/test/test_filecmp.py | |
parent | 09c7b6075cf51d5438c76a19ad244b663d4cf048 (diff) | |
download | cpython-eeca37e0b5a86bc8113f9f51cace145a71c56dd4.zip cpython-eeca37e0b5a86bc8113f9f51cace145a71c56dd4.tar.gz cpython-eeca37e0b5a86bc8113f9f51cace145a71c56dd4.tar.bz2 |
SF bug #453515: filecmp.dircmp case sensitivity bug
Diffstat (limited to 'Lib/test/test_filecmp.py')
-rw-r--r-- | Lib/test/test_filecmp.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_filecmp.py b/Lib/test/test_filecmp.py index 0e5f297..b433ecc 100644 --- a/Lib/test/test_filecmp.py +++ b/Lib/test/test_filecmp.py @@ -49,7 +49,11 @@ class DirCompareTestCase(unittest.TestCase): data = 'Contents of file go here.\n' for dir in [self.dir, self.dir_same, self.dir_diff]: os.mkdir(dir) - output = open(os.path.join(dir, 'file'), 'w') + if dir is self.dir_same: + fn = 'FiLe' # Verify case-insensitive comparison + else: + fn = 'file' + output = open(os.path.join(dir, fn), 'w') output.write(data) output.close() @@ -93,7 +97,7 @@ class DirCompareTestCase(unittest.TestCase): def test_dircmp(self): # Check attributes for comparison of two identical directories d = filecmp.dircmp(self.dir, self.dir_same) - self.failUnless(d.left_list == d.right_list == ['file']) + self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) self.failUnless(d.common == ['file']) self.failUnless(d.left_only == d.right_only == []) self.failUnless(d.same_files == ['file']) |