~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_inv.py

  • Committer: Aaron Bentley
  • Date: 2006-08-07 23:14:45 UTC
  • mto: (1731.1.39 nested-trees)
  • mto: This revision was merged to the branch mainline in revision 1910.
  • Revision ID: aaron.bentley@utoronto.ca-20060807231445-618a867437f6e82c
RemoveĀ is_root

Show diffs side-by-side

added added

removed removed

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