~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        for f in files:
54
54
            id=f+_id
55
55
            self.assertNotInWorkingTree(f)
56
 
            self.failIfExists(f)
 
56
            self.assertPathDoesNotExist(f)
57
57
 
58
58
    def assertFilesUnversioned(self, files):
59
59
        for f in files:
60
60
            self.assertNotInWorkingTree(f)
61
 
            self.failUnlessExists(f)
 
61
            self.assertPathExists(f)
62
62
 
63
63
    def changeFile(self, file_name):
64
64
        f = file(file_name, 'ab')
80
80
        self.assertEqual('', err)
81
81
        self.assertEqual('', out)
82
82
        self.assertInWorkingTree('foo', tree=tree)
83
 
        self.failUnlessExists('foo')
 
83
        self.assertPathExists('foo')
84
84
 
85
85
    def test_remove_no_files_specified_missing_dir_and_contents(self):
86
86
        tree = self._make_tree_and_add(
94
94
            err)
95
95
        # non-missing paths not touched:
96
96
        self.assertInWorkingTree('foo', tree=tree)
97
 
        self.failUnlessExists('foo')
 
97
        self.assertPathExists('foo')
98
98
        self.assertInWorkingTree('dir', tree=tree)
99
 
        self.failUnlessExists('dir')
 
99
        self.assertPathExists('dir')
100
100
        # missing files unversioned
101
101
        self.assertNotInWorkingTree('dir/missing', tree=tree)
102
102
        self.assertNotInWorkingTree('dir/missing/child', tree=tree)
120
120
        self.assertEqual('removed bar\n', err)
121
121
        # non-missing files not touched:
122
122
        self.assertInWorkingTree('foo', tree=tree)
123
 
        self.failUnlessExists('foo')
 
123
        self.assertPathExists('foo')
124
124
        # missing files unversioned
125
125
        self.assertNotInWorkingTree('bar', tree=tree)
126
126
 
135
135
        self.assertEqual('removed linkname\n', err)
136
136
        # non-missing files not touched:
137
137
        self.assertInWorkingTree('foo', tree=tree)
138
 
        self.failUnlessExists('foo')
 
138
        self.assertPathExists('foo')
139
139
        # missing files unversioned
140
140
        self.assertNotInWorkingTree('linkname', tree=tree)
141
141
 
196
196
        self.run_bzr_remove_changed_files(
197
197
            ['../a', 'c', '.', '../d'], working_dir='b')
198
198
        self.assertNotInWorkingTree(files)
199
 
        self.failIfExists(files)
 
199
        self.assertPathDoesNotExist(files)
200
200
 
201
201
    def test_remove_keep_unversioned_files(self):
202
202
        self.build_tree(files)
237
237
        for f in my_files:
238
238
            osutils.delete_any(f)
239
239
        self.assertInWorkingTree(files)
240
 
        self.failIfExists(files)
 
240
        self.assertPathDoesNotExist(files)
241
241
        self.run_bzr('remove ' + ' '.join(files))
242
242
        self.assertNotInWorkingTree(a)
243
 
        self.failIfExists(files)
 
243
        self.assertPathDoesNotExist(files)
244
244
 
245
245
    def test_remove_non_existing_files(self):
246
246
        tree = self._make_tree_and_add([])