~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

  • Committer: Robert Collins
  • Date: 2006-03-01 03:13:44 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060301031344-b661bf92b4985554
add versioned file clear_cache entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
        self.assertRaises(RevisionNotPresent,
71
71
            f.get_ancestry, ['rM', 'rX'])
 
72
        
 
73
    def test_clear_cache(self):
 
74
        f = self.get_file()
 
75
        # on a new file it should not error
 
76
        f.clear_cache()
 
77
        # and after adding content, doing a clear_cache and a get should work.
 
78
        f.add_lines('0', [], ['a'])
 
79
        f.clear_cache()
 
80
        self.assertEqual(['a'], f.get_lines('0'))
72
81
 
73
82
    def test_clone_text(self):
74
83
        f = self.get_file()