diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-08-15 01:45:25 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-08-15 01:45:25 (GMT) |
commit | 7f848337263e5a703e3e15b5f6d123d3fde2b221 (patch) | |
tree | 7c2a5a8be1751e694617ac75d90ca63662dab62a /Lib | |
parent | 488cc36123dc57bbb261f97592ec89d02e019f9a (diff) | |
parent | 2b209cd78d5a36d63b00d0a4350b78aec7bc820b (diff) | |
download | cpython-7f848337263e5a703e3e15b5f6d123d3fde2b221.zip cpython-7f848337263e5a703e3e15b5f6d123d3fde2b221.tar.gz cpython-7f848337263e5a703e3e15b5f6d123d3fde2b221.tar.bz2 |
Merge #15269: document dircmp.left and right, and add tests for them.
Patch by Chris Jerdonek.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_filecmp.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_filecmp.py b/Lib/test/test_filecmp.py index 9b5725d..0959979 100644 --- a/Lib/test/test_filecmp.py +++ b/Lib/test/test_filecmp.py @@ -98,7 +98,10 @@ class DirCompareTestCase(unittest.TestCase): def test_dircmp(self): # Check attributes for comparison of two identical directories - d = filecmp.dircmp(self.dir, self.dir_same) + left_dir, right_dir = self.dir, self.dir_same + d = filecmp.dircmp(left_dir, right_dir) + self.assertEqual(d.left, left_dir) + self.assertEqual(d.right, right_dir) if self.caseinsensitive: self.assertEqual([d.left_list, d.right_list],[['file'], ['FiLe']]) else: @@ -109,7 +112,10 @@ class DirCompareTestCase(unittest.TestCase): self.assertEqual(d.diff_files, []) # Check attributes for comparison of two different directories - d = filecmp.dircmp(self.dir, self.dir_diff) + left_dir, right_dir = self.dir, self.dir_diff + d = filecmp.dircmp(left_dir, right_dir) + self.assertEqual(d.left, left_dir) + self.assertEqual(d.right, right_dir) self.assertEqual(d.left_list, ['file']) self.assertTrue(d.right_list == ['file', 'file2']) self.assertEqual(d.common, ['file']) |