diff options
| author | Brett Cannon <brett@python.org> | 2013-06-14 18:33:21 -0400 |
|---|---|---|
| committer | Brett Cannon <brett@python.org> | 2013-06-14 18:33:21 -0400 |
| commit | 8c18da20f979cf428414a038bfaee46283e12fa2 (patch) | |
| tree | f58a84e784555673c6e7b813846e5fc40ea2c27b /Lib/test/test_filecmp.py | |
| parent | 33915eba7c8293eab4962345fbbb1e5d193295ed (diff) | |
| parent | 7bff3cbe3de7bc96575396ad3fd7bfc6058eaa94 (diff) | |
| download | cpython-git-8c18da20f979cf428414a038bfaee46283e12fa2.tar.gz | |
merge
Diffstat (limited to 'Lib/test/test_filecmp.py')
| -rw-r--r-- | Lib/test/test_filecmp.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_filecmp.py b/Lib/test/test_filecmp.py index f760147016..c7cb3fcf36 100644 --- a/Lib/test/test_filecmp.py +++ b/Lib/test/test_filecmp.py @@ -39,6 +39,13 @@ class FileCompareTestCase(unittest.TestCase): self.assertFalse(filecmp.cmp(self.name, self.dir), "File and directory compare as equal") + def test_cache_clear(self): + first_compare = filecmp.cmp(self.name, self.name_same, shallow=False) + second_compare = filecmp.cmp(self.name, self.name_diff, shallow=False) + filecmp.clear_cache() + self.assertTrue(len(filecmp._cache) == 0, + "Cache not cleared after calling clear_cache") + class DirCompareTestCase(unittest.TestCase): def setUp(self): tmpdir = tempfile.gettempdir() |
