~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_versioning.py

Move working tree initialisation out from  Branch.initialize, deprecated Branch.initialize to Branch.create.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        self.assertEquals(delta.added[0][0], 'dir')
115
115
        self.failIf(delta.modified)
116
116
 
117
 
    def test_working_tree_add_in_unversioned(self):
118
 
        """Try to add a file in an unversioned directory.
119
 
 
120
 
        "bzr add" adds the parent as necessary, but simple working tree add
121
 
        doesn't do that.
122
 
        """
123
 
        from bzrlib.branch import Branch
124
 
        from bzrlib.errors import NotVersionedError
125
 
        from bzrlib.workingtree import WorkingTree
126
 
 
127
 
        b = Branch.initialize(u'.')
128
 
 
129
 
        self.build_tree(['foo/',
130
 
                         'foo/hello'])
131
 
 
132
 
        self.assertRaises(NotVersionedError,
133
 
                          WorkingTree(b.base, b).add,
134
 
                          'foo/hello')
135
 
        
136
 
        self.check_branch()
137
 
 
138
117
    def check_branch(self):
139
118
        """After all the above changes, run the check and upgrade commands.
140
119