Merge pull request #3457 from chiizujin/help_category
Fix file help topic category casing differences appearing as duplicates
This commit is contained in:
commit
13b36d2669
2 changed files with 2 additions and 2 deletions
|
|
@ -227,7 +227,7 @@ class FileHelpStorageHandler:
|
||||||
|
|
||||||
for dct in loaded_help_dicts:
|
for dct in loaded_help_dicts:
|
||||||
key = dct.get("key").lower().strip()
|
key = dct.get("key").lower().strip()
|
||||||
category = dct.get("category", _DEFAULT_HELP_CATEGORY).strip()
|
category = dct.get("category", _DEFAULT_HELP_CATEGORY).lower().strip()
|
||||||
aliases = list(dct.get("aliases", []))
|
aliases = list(dct.get("aliases", []))
|
||||||
entrytext = dct.get("text", "")
|
entrytext = dct.get("text", "")
|
||||||
locks = dct.get("locks", "")
|
locks = dct.get("locks", "")
|
||||||
|
|
|
||||||
|
|
@ -138,5 +138,5 @@ class TestFileHelp(TestCase):
|
||||||
for inum, helpentry in enumerate(result):
|
for inum, helpentry in enumerate(result):
|
||||||
self.assertEqual(HELP_ENTRY_DICTS[inum]["key"], helpentry.key)
|
self.assertEqual(HELP_ENTRY_DICTS[inum]["key"], helpentry.key)
|
||||||
self.assertEqual(HELP_ENTRY_DICTS[inum].get("aliases", []), helpentry.aliases)
|
self.assertEqual(HELP_ENTRY_DICTS[inum].get("aliases", []), helpentry.aliases)
|
||||||
self.assertEqual(HELP_ENTRY_DICTS[inum]["category"], helpentry.help_category)
|
self.assertEqual(HELP_ENTRY_DICTS[inum]["category"].lower(), helpentry.help_category)
|
||||||
self.assertEqual(HELP_ENTRY_DICTS[inum]["text"], helpentry.entrytext)
|
self.assertEqual(HELP_ENTRY_DICTS[inum]["text"], helpentry.entrytext)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue