Rev 2448: Correct spelling of Indexs to Indices. in file:///home/robertc/source/baz/help-contexts/

Robert Collins robertc at robertcollins.net
Fri Apr 20 03:56:47 BST 2007


At file:///home/robertc/source/baz/help-contexts/

------------------------------------------------------------
revno: 2448
revision-id: robertc at robertcollins.net-20070420025644-sxlhafhnmv46xgfs
parent: robertc at robertcollins.net-20070420024834-aqmgb1fu8qiw73p6
committer: Robert Collins <robertc at robertcollins.net>
branch nick: help-contexts
timestamp: Fri 2007-04-20 12:56:44 +1000
message:
  Correct spelling of Indexs to Indices.
modified:
  bzrlib/help.py                 help.py-20050505025907-4dd7a6d63912f894
  bzrlib/tests/test_help.py      test_help.py-20070419045354-6q6rq15j9e2n5fna-1
=== modified file 'bzrlib/help.py'
--- a/bzrlib/help.py	2007-04-20 02:48:34 +0000
+++ b/bzrlib/help.py	2007-04-20 02:56:44 +0000
@@ -37,8 +37,8 @@
     if outfile is None:
         outfile = sys.stdout
 
-    indexs = HelpIndexs()
-    topics = indexs.search(topic)
+    indices = HelpIndices()
+    topics = indices.search(topic)
     outfile.write(topics[0].get_help_text())
 
 
@@ -92,8 +92,8 @@
                                     "All hidden commands")
 
 
-class HelpIndexs(object):
-    """An object to manage help in multiple indexs.
+class HelpIndices(object):
+    """An object to manage help in multiple indices.
     
     This maintains a list of places to search for help. It is currently
     separate to the HelpTopicRegistry because of its ordered nature, but

=== modified file 'bzrlib/tests/test_help.py'
--- a/bzrlib/tests/test_help.py	2007-04-20 02:48:34 +0000
+++ b/bzrlib/tests/test_help.py	2007-04-20 02:56:44 +0000
@@ -122,25 +122,25 @@
         self.assertEqual([], index.get_topics('nothing by this name'))
 
 
-class TestHelpIndexs(tests.TestCase):
-    """Tests for the HelpIndexs class."""
+class TestHelpIndices(tests.TestCase):
+    """Tests for the HelpIndices class."""
 
     def test_default_search_path(self):
         """The default search path should include internal indexs."""
-        indexs = help.HelpIndexs()
-        self.assertEqual(2, len(indexs.search_path))
+        indices = help.HelpIndices()
+        self.assertEqual(2, len(indices.search_path))
         # help topics should be searched in first.
-        self.assertIsInstance(indexs.search_path[0],
+        self.assertIsInstance(indices.search_path[0],
             help_topics.HelpTopicIndex)
         # with commands being search second.
-        self.assertIsInstance(indexs.search_path[1],
+        self.assertIsInstance(indices.search_path[1],
             commands.HelpCommandIndex)
 
     def test_search_for_unknown_topic_raises(self):
         """Searching for an unknown topic should raise NoHelpTopic."""
-        indexs = help.HelpIndexs()
-        indexs.search_path = []
-        error = self.assertRaises(errors.NoHelpTopic, indexs.search, 'foo')
+        indices = help.HelpIndices()
+        indices.search_path = []
+        error = self.assertRaises(errors.NoHelpTopic, indices.search, 'foo')
         self.assertEqual('foo', error.topic)
 
     def test_search_calls_get_topic(self):
@@ -152,7 +152,7 @@
             def get_topics(self, topic):
                 calls.append(('get_topics', self.name, topic))
                 return ['something']
-        index = help.HelpIndexs()
+        index = help.HelpIndices()
         index.search_path = [RecordingIndex('1'), RecordingIndex('2')]
         # try with None
         index.search(None)
@@ -177,6 +177,6 @@
                 self.result = search_result
             def get_topics(self, topic):
                 return self.result
-        index = help.HelpIndexs()
+        index = help.HelpIndices()
         index.search_path = [CannedIndex(['a']), CannedIndex(['b', 'c'])]
         self.assertEqual(['a', 'b', 'c'], index.search(None))



More information about the bazaar-commits mailing list