~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-06 02:31:39 UTC
  • mfrom: (2665.1.2 stricter-run_bzr)
  • Revision ID: pqm@pqm.ubuntu.com-20070806023139-97nrt9mu4qihcdf3
(robertc) Merge Michael Hudson's run_bzr keyword usage fix. (Michael Hudson)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1345
1345
        working_dir = kwargs.pop('working_dir', None)
1346
1346
        error_regexes = kwargs.pop('error_regexes', [])
1347
1347
 
 
1348
        if kwargs:
 
1349
            raise TypeError("run_bzr() got unexpected keyword arguments '%s'"
 
1350
                            % kwargs.keys())
 
1351
 
1348
1352
        if len(args) == 1:
1349
1353
            if isinstance(args[0], (list, basestring)):
1350
1354
                args = args[0]
1386
1390
 
1387
1391
            # Make sure that commit is failing because there is nothing to do
1388
1392
            self.run_bzr_error(['no changes to commit'],
1389
 
                               'commit', '-m', 'my commit comment')
 
1393
                               ['commit', '-m', 'my commit comment'])
1390
1394
            # Make sure --strict is handling an unknown file, rather than
1391
1395
            # giving us the 'nothing to do' error
1392
1396
            self.build_tree(['unknown'])
1393
1397
            self.run_bzr_error(['Commit refused because there are unknown files'],
1394
 
                               'commit', '--strict', '-m', 'my commit comment')
 
1398
                               ['commit', --strict', '-m', 'my commit comment'])
1395
1399
        """
1396
1400
        kwargs.setdefault('retcode', 3)
1397
1401
        kwargs['error_regexes'] = error_regexes