~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2007-06-26 20:32:49 UTC
  • mto: (2581.1.1 cleanup-runbzr)
  • mto: This revision was merged to the branch mainline in revision 2588.
  • Revision ID: v.ladeuil+lp@free.fr-20070626203249-sqm4afiai5dxofum
Deprecate the varargs syntax and fix the tests.

* bzrlib/tests/__init__.py:
(TestCase.run_bzr): Activate the deprecation warning.
(TestCase.run_bzr_error): Add error_regexes to kwargs or run_bzr
get confused.

* bzrlib/tests/blackbox/test_selftest.py:
(TestRunBzr.test_args): Activate.

* bzrlib/tests/blackbox/test_inventory.py:
(TestInventory.assertInventoryEqual): Build the command from args
if not None.

* bzrlib/tests/blackbox/test_ls.py:
(TestLS.ls_equals): Build the command from args if not None.

* bzrlib/tests/blackbox/test_remove_tree.py:
(TestRemoveTree.test_remove_tree_lightweight_checkout_explicit):
Nice catch, we were calling run_bzr instead of run_bzr_error. This
went unnoticed for some time...

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
        branch = wt.branch
589
589
        wt.commit('empty commit for nonsense', allow_pointless=True)
590
590
        url = self.get_readonly_url('from')
591
 
        self.run_bzr('branch', url, 'to')
 
591
        self.run_bzr(['branch', url, 'to'])
592
592
        branch = Branch.open('to')
593
593
        self.assertEqual(1, len(branch.revision_history()))
594
594
        # the branch should be set in to to from
609
609
        self.run_bzr('add branch/file')[0]
610
610
        self.run_bzr('commit -m foo branch')[0]
611
611
        url = self.get_readonly_url('branch/')
612
 
        self.run_bzr('check', url)
 
612
        self.run_bzr(['check', url])
613
613
    
614
614
    def test_push(self):
615
615
        # create a source branch
617
617
        os.chdir('my-branch')
618
618
        self.run_bzr('init')
619
619
        file('hello', 'wt').write('foo')
620
 
        self.run_bzr('add', 'hello')
621
 
        self.run_bzr('commit', '-m', 'setup')
 
620
        self.run_bzr('add hello')
 
621
        self.run_bzr('commit -m setup')
622
622
 
623
623
        # with an explicit target work
624
 
        self.run_bzr('push', self.get_url('output-branch'))
 
624
        self.run_bzr(['push', self.get_url('output-branch')])
625
625
 
626
626
    
627
627
class HTTPTests(TestCaseWithWebserver, RemoteTests):