/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: Andrew Bennetts
  • Date: 2006-10-20 04:02:48 UTC
  • mfrom: (2091 +trunk)
  • mto: (2018.5.1 split-smart)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: andrew.bennetts@canonical.com-20061020040248-80ca63c7e0a13298
Merge from 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'))