~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_weave.py

Reconcile NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
class WeaveContains(TestBase):
66
66
    """Weave __contains__ operator"""
67
67
    def runTest(self):
68
 
        k = Weave()
 
68
        k = Weave(get_scope=lambda:None)
69
69
        self.assertFalse('foo' in k)
70
70
        k.add_lines('foo', [], TEXT_1)
71
71
        self.assertTrue('foo' in k)
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):