/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inventory_delta.py

  • Committer: Marius Kruger
  • Date: 2010-08-15 04:52:51 UTC
  • mfrom: (5376 +trunk)
  • mto: (5384.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5385.
  • Revision ID: marius.kruger@enerweb.co.za-20100815045251-izmea8nn05thhrok
merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
387
387
        root = new_inv.make_entry('directory', '', None, 'my-rich-root-id')
388
388
        root.revision = 'changed'
389
389
        new_inv.add(root)
390
 
        non_root = new_inv.make_entry('directory', 'foo', root.file_id, 'id')
 
390
        class StrangeInventoryEntry(inventory.InventoryEntry):
 
391
            kind = 'strange'
 
392
        non_root = StrangeInventoryEntry('id', 'foo', root.file_id)
391
393
        non_root.revision = 'changed'
392
 
        non_root.kind = 'strangelove'
393
394
        new_inv.add(non_root)
394
395
        delta = new_inv._make_delta(old_inv)
395
396
        serializer = inventory_delta.InventoryDeltaSerializer(
398
399
        # This test aims to prove that it errors more than how it errors.
399
400
        err = self.assertRaises(KeyError,
400
401
            serializer.delta_to_lines, NULL_REVISION, 'entry-version', delta)
401
 
        self.assertEqual(('strangelove',), err.args)
 
402
        self.assertEqual(('strange',), err.args)
402
403
 
403
404
    def test_tree_reference_disabled(self):
404
405
        old_inv = Inventory(None)