From ec75306a37a86e449bc177aede397ccd4988a51a Mon Sep 17 00:00:00 2001 From: James Vega Date: Fri, 15 Oct 2004 11:13:53 +0000 Subject: [PATCH] Added a test for when we just want to wrap a command but don't need to get any arguments from the user. --- test/test_commands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_commands.py b/test/test_commands.py index 80249634e..88da8d6d8 100644 --- a/test/test_commands.py +++ b/test/test_commands.py @@ -46,7 +46,10 @@ class CommandsTestCase(SupyTestCase): state = myspec(irc, self.msg, given) self.assertEqual(state.args, expected, 'Expected %r, got %r' % (expected, state.args)) - + + def testEmptySpec(self): + self.assertState([], [], []) + def testSpecInt(self): self.assertState(['int'], ['1'], [1]) self.assertState(['int', 'int', 'int'], ['1', '2', '3'], [1, 2, 3]) @@ -81,7 +84,7 @@ class CommandsTestCase(SupyTestCase): def testAny(self): self.assertState([any('int')], ['1', '2', '3'], [[1, 2, 3]]) self.assertState([None, any('int')], ['1', '2', '3'], ['1', [2, 3]]) - + ## def testAny(self): ## self.assertState([None, any('int'), None], ## ['foo', 'bar'], @@ -92,7 +95,7 @@ class CommandsTestCase(SupyTestCase): self.assertState(spec, ['1', '2', '3'], [[1, 2, 3]]) self.assertRaises(callbacks.Error, self.assertState, spec, [], ['asdf']) - + # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: