~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

  • Committer: Aaron Bentley
  • Date: 2009-04-07 17:13:51 UTC
  • mto: This revision was merged to the branch mainline in revision 4266.
  • Revision ID: aaron@aaronbentley.com-20090407171351-m5l8kej7qlt7dc3k
Use generated subclass instead of patching Command instance

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
 
64
64
    @staticmethod
65
65
    def get_command(options):
66
 
        c = commands.Command()
67
 
        c.__doc__ = 'Bar'
68
 
        c.takes_options = options
69
 
        return c
 
66
        class cmd_foo(commands.Command):
 
67
            'Bar'
 
68
 
 
69
            takes_options = options
 
70
 
 
71
        return cmd_foo()
70
72
 
71
73
    def test_help_hidden(self):
72
74
        c = self.get_command([option.Option('foo', hidden=True)])