/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_inv.py

  • Committer: v.ladeuil+lp at free
  • Date: 2006-10-17 14:01:12 UTC
  • mfrom: (2084 +trunk)
  • mto: (2145.1.1 keepalive)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: v.ladeuil+lp@free.fr-20061017140112-8ae6aac456429ccf
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 by Canonical Ltd
 
1
# Copyright (C) 2005, 2006 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
544
544
        os.unlink('b1/a')
545
545
        wt.revert([])
546
546
        self.assertEqual(len(wt.inventory), 1)
 
547
 
 
548
 
 
549
class TestIsRoot(TestCase):
 
550
    """Ensure our root-checking code is accurate."""
 
551
 
 
552
    def test_is_root(self):
 
553
        inv = Inventory('TREE_ROOT')
 
554
        self.assertTrue(inv.is_root('TREE_ROOT'))
 
555
        self.assertFalse(inv.is_root('booga'))
 
556
        inv.root.file_id = 'booga'
 
557
        self.assertFalse(inv.is_root('TREE_ROOT'))
 
558
        self.assertTrue(inv.is_root('booga'))
 
559
        # works properly even if no root is set
 
560
        inv.root = None
 
561
        self.assertFalse(inv.is_root('TREE_ROOT'))
 
562
        self.assertFalse(inv.is_root('booga'))