~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

  • Committer: Robert Collins
  • Date: 2007-04-20 03:54:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2441.
  • Revision ID: robertc@robertcollins.net-20070420035406-e68xf089otkpo7xx
Teach Command.get_help_text to show additional help cross references when supplied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
            _see_also = ['foo', 'bar']
126
126
        command = ACommand()
127
127
        self.assertEqual(['bar', 'foo'], command.get_see_also())
 
128
 
 
129
    def test_additional_terms(self):
 
130
        """Additional terms can be supplied and are deduped and sorted."""
 
131
        class ACommand(commands.Command):
 
132
            _see_also = ['foo', 'bar']
 
133
        command = ACommand()
 
134
        self.assertEqual(['bar', 'foo', 'gam'],
 
135
            command.get_see_also(['gam', 'bar', 'gam']))
 
136