~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Never raise KnownFailure in tests,
 use knownFailure method instead (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
        out, err = self.run_bzr(["add", "a", "b"], working_dir=u"\xA7")
240
240
        self.assertEquals(out, "adding a\n" "adding b\n")
241
241
        self.assertEquals(err, "")
242
 
        
243
 
    def test_add_skip_large_files(self):
244
 
        """Test skipping files larger than add.maximum_file_size"""
245
 
        tree = self.make_branch_and_tree('.')
246
 
        self.build_tree(['small.txt', 'big.txt', 'big2.txt'])
247
 
        self.build_tree_contents([('small.txt', '0\n')])
248
 
        self.build_tree_contents([('big.txt', '01234567890123456789\n')])
249
 
        self.build_tree_contents([('big2.txt', '01234567890123456789\n')])
250
 
        tree.branch.get_config().set_user_option('add.maximum_file_size', 5)
251
 
        out = self.run_bzr('add')[0]
252
 
        results = sorted(out.rstrip('\n').split('\n'))
253
 
        self.assertEquals(['adding small.txt'], 
254
 
                          results)
255
 
        # named items never skipped, even if over max
256
 
        out, err = self.run_bzr(["add", "big2.txt"])
257
 
        results = sorted(out.rstrip('\n').split('\n'))
258
 
        self.assertEquals(['adding big2.txt'], 
259
 
                          results)
260
 
        self.assertEquals(err, "")
261
 
        tree.branch.get_config().set_user_option('add.maximum_file_size', 30)
262
 
        out = self.run_bzr('add')[0]
263
 
        results = sorted(out.rstrip('\n').split('\n'))
264
 
        self.assertEquals(['adding big.txt'], 
265
 
                          results)