~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Jelmer Vernooij
  • Date: 2015-11-15 02:30:05 UTC
  • mto: This revision was merged to the branch mainline in revision 6609.
  • Revision ID: jelmer@jelmer.uk-20151115023005-fcfi763b5eu1ne2o
Fix auodoc_rstx when running with LANG=C.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
325
325
        inv = inventory.Inventory(root_id='someroot')
326
326
        inv.root.revision = 'therev'
327
327
        inv2 = inv.copy()
328
 
        self.assertEqual('someroot', inv2.root.file_id)
329
 
        self.assertEqual('therev', inv2.root.revision)
 
328
        self.assertEquals('someroot', inv2.root.file_id)
 
329
        self.assertEquals('therev', inv2.root.revision)
330
330
 
331
331
    def test_create_tree_reference(self):
332
332
        inv = inventory.Inventory('tree-root-123')
1101
1101
        delta = [("", None, base_inv.root.file_id, None),
1102
1102
            (None, "",  "myrootid", inv.root)]
1103
1103
        new_inv = base_inv.create_by_apply_delta(delta, "expectedid")
1104
 
        self.assertEqual(reference_inv.root, new_inv.root)
 
1104
        self.assertEquals(reference_inv.root, new_inv.root)
1105
1105
 
1106
1106
    def test_create_by_apply_delta_empty_add_child(self):
1107
1107
        inv = Inventory()
1552
1552
        repository = self.make_repository('.')
1553
1553
        tree = repository.revision_tree(revision.NULL_REVISION)
1554
1554
        inv = mutable_inventory_from_tree(tree)
1555
 
        self.assertEqual(revision.NULL_REVISION, inv.revision_id)
1556
 
        self.assertEqual(0, len(inv))
 
1555
        self.assertEquals(revision.NULL_REVISION, inv.revision_id)
 
1556
        self.assertEquals(0, len(inv))
1557
1557
 
1558
1558
    def test_some_files(self):
1559
1559
        wt = self.make_branch_and_tree('.')
1562
1562
        revid = wt.commit("commit")
1563
1563
        tree = wt.branch.repository.revision_tree(revid)
1564
1564
        inv = mutable_inventory_from_tree(tree)
1565
 
        self.assertEqual(revid, inv.revision_id)
1566
 
        self.assertEqual(2, len(inv))
1567
 
        self.assertEqual("a", inv['thefileid'].name)
 
1565
        self.assertEquals(revid, inv.revision_id)
 
1566
        self.assertEquals(2, len(inv))
 
1567
        self.assertEquals("a", inv['thefileid'].name)
1568
1568
        # The inventory should be mutable and independent of
1569
1569
        # the original tree
1570
1570
        self.assertFalse(tree.root_inventory['thefileid'].executable)