~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_xml.py

  • Committer: Martin Pool
  • Date: 2005-09-06 06:44:11 UTC
  • Revision ID: mbp@sourcefrog.net-20050906064410-86f1113d1d1ee429
- fix v5 packing of inventory entries

  add test for round-trip on inventory entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        eq(ie.entry_version, 'mbp@foo-00')
122
122
        eq(ie.name, 'bar')
123
123
        eq(inv[ie.parent_id].kind, 'directory')
 
124
 
 
125
    def test_repack_inventory_5(self):
 
126
        inp = StringIO(_committed_inv_v5)
 
127
        inv = serializer_v5.read_inventory(inp)
 
128
        outp = StringIO()
 
129
        serializer_v5.write_inventory(inv, outp)
 
130
        inv2 = serializer_v5.read_inventory(StringIO(outp.getvalue()))
 
131
        self.assertEqual(inv, inv2)