~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(vila) Migrate more branch config options to config stacks. (Vincent Ladeuil)

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
 
        
 
242
 
243
243
    def test_add_skip_large_files(self):
244
244
        """Test skipping files larger than add.maximum_file_size"""
245
245
        tree = self.make_branch_and_tree('.')
250
250
        tree.branch.get_config().set_user_option('add.maximum_file_size', 5)
251
251
        out = self.run_bzr('add')[0]
252
252
        results = sorted(out.rstrip('\n').split('\n'))
253
 
        self.assertEquals(['adding small.txt'], 
254
 
                          results)
 
253
        self.assertEquals(['adding small.txt'], results)
255
254
        # named items never skipped, even if over max
256
255
        out, err = self.run_bzr(["add", "big2.txt"])
257
256
        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)
 
257
        self.assertEquals(['adding big2.txt'], results)
 
258
        self.assertEquals("", err)
 
259
        tree.branch.get_config_stack().set('add.maximum_file_size', 30)
262
260
        out = self.run_bzr('add')[0]
263
261
        results = sorted(out.rstrip('\n').split('\n'))
264
 
        self.assertEquals(['adding big.txt'], 
265
 
                          results)
 
262
        self.assertEquals(['adding big.txt'], results)