~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_xml.py

  • Committer: Robert Collins
  • Date: 2005-10-11 03:19:29 UTC
  • Revision ID: robertc@robertcollins.net-20051011031929-2d523107133c43be
further tuning of pull, do not do a local merge or fetch at all, if the remote branch is no newer than we are

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
from cStringIO import StringIO
18
18
 
19
 
from bzrlib.tests import TestCase
 
19
from bzrlib.selftest import TestCase
20
20
from bzrlib.inventory import Inventory, InventoryEntry
21
21
from bzrlib.xml4 import serializer_v4
22
22
from bzrlib.xml5 import serializer_v5
126
126
        self.assertEqual(inv, inv2)
127
127
 
128
128
    def test_repack_revision_5(self):
129
 
        """Round-trip revision to XML v5"""
130
129
        inp = StringIO(_revision_v5)
131
130
        rev = serializer_v5.read_revision(inp)
132
131
        outp = StringIO()
133
132
        serializer_v5.write_revision(rev, outp)
134
 
        outfile_contents = outp.getvalue()
135
 
        rev2 = serializer_v5.read_revision(StringIO(outfile_contents))
 
133
        rev2 = serializer_v5.read_revision(StringIO(outp.getvalue()))
136
134
        self.assertEqual(rev, rev2)
137
135
 
138
 
    def test_pack_revision_5(self):
139
 
        """Pack revision to XML v5"""
140
 
        # fixed 20051025, revisions should have final newline
141
 
        rev = serializer_v5.read_revision_from_string(_revision_v5)
142
 
        outp = StringIO()
143
 
        serializer_v5.write_revision(rev, outp)
144
 
        outfile_contents = outp.getvalue()
145
 
        self.assertEqual(outfile_contents[-1], '\n')
146
 
        self.assertEqualDiff(outfile_contents, serializer_v5.write_revision_to_string(rev))