~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Robert Collins
  • Date: 2006-03-02 03:12:34 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060302031234-cf6b75961f27c5df
InterVersionedFile implemented.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from bzrlib.osutils import split_lines
26
26
from bzrlib.tests import TestCaseInTempDir
27
27
from bzrlib.transport.local import LocalTransport
 
28
from bzrlib.transport.memory import MemoryTransport
28
29
from bzrlib.transactions import PassThroughTransaction
29
30
 
30
31
 
254
255
        self.assertEquals(origins[0], ('text-c', 'z\n')) 
255
256
        self.assertEquals(origins[1], ('text-b', 'c\n')) 
256
257
 
 
258
    def test_create_empty_annotated(self):
 
259
        k1 = KnitVersionedFile(LocalTransport('.'), 'test1', 'w',
 
260
                               KnitAnnotateFactory())
 
261
        # 0
 
262
        k1.add_lines('text-a', [], ['a\n', 'b\n'])
 
263
        k2 = k1.create_empty('t', MemoryTransport())
 
264
        self.assertTrue(isinstance(k2.factory, KnitAnnotateFactory))
 
265
        self.assertEqual(k1.delta, k2.delta)
 
266
        # the generic test checks for empty content and file class
 
267
 
257
268
 
258
269
TEXT_1 = """\
259
270
Banana cup cakes: