~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testinv.py

  • Committer: Robert Collins
  • Date: 2005-10-03 15:19:25 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003151925-19df6a9a5e9dc42a
remove kind from the InventoryEntry constructor - only child classes should be created now

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from bzrlib.branch import Branch
21
21
from bzrlib.diff import internal_diff
22
 
from bzrlib.inventory import Inventory, InventoryEntry, ROOT_ID
 
22
from bzrlib.inventory import Inventory, ROOT_ID
23
23
import bzrlib.inventory as inventory
24
24
from bzrlib.osutils import has_symlinks
25
25
from bzrlib.selftest import TestCase, TestCaseInTempDir
76
76
        self.assertEqual(dir.kind_character(), '/')
77
77
 
78
78
    def test_link_kind_character(self):
79
 
        dir = InventoryEntry('123', 'hello.c', 'symlink', ROOT_ID)
 
79
        dir = inventory.InventoryLink('123', 'hello.c', ROOT_ID)
80
80
        self.assertEqual(dir.kind_character(), '')
81
81
 
82
82
    def test_dir_detect_changes(self):
105
105
        self.assertEqual((True, True), right.detect_changes(left))
106
106
 
107
107
    def test_symlink_detect_changes(self):
108
 
        left = InventoryEntry('123', 'hello.c', 'symlink', ROOT_ID)
 
108
        left = inventory.InventoryLink('123', 'hello.c', ROOT_ID)
109
109
        left.text_sha1 = 123
110
110
        left.executable = True
111
111
        left.symlink_target='foo'
112
 
        right = InventoryEntry('123', 'hello.c', 'symlink', ROOT_ID)
 
112
        right = inventory.InventoryLink('123', 'hello.c', ROOT_ID)
113
113
        right.text_sha1 = 321
114
114
        right.symlink_target='foo'
115
115
        self.assertEqual((False, False), left.detect_changes(right))
127
127
        self.failIf(dir.has_text())
128
128
 
129
129
    def test_link_has_text(self):
130
 
        link = InventoryEntry('123', 'hello.c', 'symlink', ROOT_ID)
 
130
        link = inventory.InventoryLink('123', 'hello.c', ROOT_ID)
131
131
        self.failIf(link.has_text())
132
132
 
133
133