~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-18 06:42:17 UTC
  • mfrom: (0.2.1)
  • mto: This revision was merged to the branch mainline in revision 1463.
  • Revision ID: robertc@robertcollins.net-20051018064217-e810bd94c74a9ad1
Factor out the guts of 'pull' from the command into WorkingTree.pull().
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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))