~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_weave.py

  • Committer: Robert Collins
  • Date: 2008-04-08 03:39:43 UTC
  • mto: This revision was merged to the branch mainline in revision 3350.
  • Revision ID: robertc@robertcollins.net-20080408033943-ihbgs5wyqnh61bit
 * ``VersionedFile.get_sha1`` is deprecated, please use
   ``VersionedFile.get_sha1s``. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
                         [('text0', TEXT_0[0])])
85
85
 
86
86
 
87
 
class GetSha1(TestBase):
88
 
    def test_get_sha1(self):
89
 
        k = Weave()
90
 
        k.add_lines('text0', [], 'text0')
91
 
        self.assertEqual('34dc0e430c642a26c3dd1c2beb7a8b4f4445eb79',
92
 
                         k.get_sha1('text0'))
93
 
        self.assertRaises(errors.RevisionNotPresent,
94
 
                          k.get_sha1, 0)
95
 
        self.assertRaises(errors.RevisionNotPresent,
96
 
                          k.get_sha1, 'text1')
97
 
                        
98
 
 
99
87
class InvalidAdd(TestBase):
100
88
    """Try to use invalid version number during add."""
101
89
    def runTest(self):