mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 09:29:24 +01:00
Updated for the help/morehelp -> syntax/help conversion.
This commit is contained in:
parent
407ac34e52
commit
359ad14888
@ -259,7 +259,7 @@ class PluginDocumentation:
|
|||||||
for attr in cb.__class__.__dict__:
|
for attr in cb.__class__.__dict__:
|
||||||
if cb.isCommand(attr):
|
if cb.isCommand(attr):
|
||||||
self.failUnless(getattr(cb, attr).__doc__,
|
self.failUnless(getattr(cb, attr).__doc__,
|
||||||
'%s has no help' % attr)
|
'%s has no syntax' % attr)
|
||||||
def testAllCommandsHaveMorehelp(self):
|
def testAllCommandsHaveMorehelp(self):
|
||||||
for cb in self.irc.callbacks:
|
for cb in self.irc.callbacks:
|
||||||
if isinstance(cb, callbacks.PrivmsgRegexp):
|
if isinstance(cb, callbacks.PrivmsgRegexp):
|
||||||
@ -270,7 +270,7 @@ class PluginDocumentation:
|
|||||||
command = getattr(cb, attr)
|
command = getattr(cb, attr)
|
||||||
helps = command.__doc__
|
helps = command.__doc__
|
||||||
self.failUnless(helps and len(helps.splitlines()) >= 3,
|
self.failUnless(helps and len(helps.splitlines()) >= 3,
|
||||||
'%s has no morehelp' % attr)
|
'%s has no help' % attr)
|
||||||
|
|
||||||
def testPluginHasDocumentation(self):
|
def testPluginHasDocumentation(self):
|
||||||
for cb in self.irc.callbacks:
|
for cb in self.irc.callbacks:
|
||||||
|
@ -70,8 +70,8 @@ class AliasTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
plugins = ('Alias', 'FunCommands', 'Utilities', 'MiscCommands')
|
plugins = ('Alias', 'FunCommands', 'Utilities', 'MiscCommands')
|
||||||
def testAliasHelp(self):
|
def testAliasHelp(self):
|
||||||
self.assertNotError('alias slashdot foo')
|
self.assertNotError('alias slashdot foo')
|
||||||
self.assertNotRegexp('help slashdot', 'None')
|
self.assertNotRegexp('syntax slashdot', 'None')
|
||||||
self.assertResponse('morehelp slashdot', "Alias for 'foo'")
|
self.assertRegexp('help slashdot', "Alias for 'foo'")
|
||||||
|
|
||||||
def testSimpleAlias(self):
|
def testSimpleAlias(self):
|
||||||
pi = '3.1456926535897932384626433832795028841971693'
|
pi = '3.1456926535897932384626433832795028841971693'
|
||||||
|
@ -35,12 +35,12 @@ class DictTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
plugins = ('Dict', 'MiscCommands')
|
plugins = ('Dict', 'MiscCommands')
|
||||||
def testHelps(self):
|
def testHelps(self):
|
||||||
self.assertNotError('list Dict')
|
self.assertNotError('list Dict')
|
||||||
|
self.assertNotError('syntax dict')
|
||||||
self.assertNotError('help dict')
|
self.assertNotError('help dict')
|
||||||
self.assertNotError('morehelp dict')
|
self.assertNotError('syntax dictionaries')
|
||||||
self.assertNotError('help dictionaries')
|
self.assertNotError('help dictionaries')
|
||||||
self.assertNotError('morehelp dictionaries')
|
self.assertNotError('syntax randomdictionary')
|
||||||
self.assertNotError('help randomdictionary')
|
self.assertNotError('help randomdictionary')
|
||||||
self.assertNotError('morehelp randomdictionary')
|
|
||||||
|
|
||||||
def testDict(self):
|
def testDict(self):
|
||||||
self.assertNotError('dict slash')
|
self.assertNotError('dict slash')
|
||||||
|
Loading…
Reference in New Issue
Block a user