本文整理汇总了Python中topydo.commands.DepCommand.DepCommand.usage方法的典型用法代码示例。如果您正苦于以下问题:Python DepCommand.usage方法的具体用法?Python DepCommand.usage怎么用?Python DepCommand.usage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类topydo.commands.DepCommand.DepCommand
的用法示例。
在下文中一共展示了DepCommand.usage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_add5
# 需要导入模块: from topydo.commands.DepCommand import DepCommand [as 别名]
# 或者: from topydo.commands.DepCommand.DepCommand import usage [as 别名]
def test_add5(self):
command = DepCommand(["add", "1"], self.todolist, self.out, self.error)
command.execute()
self.assertFalse(self.todolist.is_dirty())
self.assertEqual(self.output, "")
self.assertEqual(self.errors, command.usage() + "\n")
示例2: test_help
# 需要导入模块: from topydo.commands.DepCommand import DepCommand [as 别名]
# 或者: from topydo.commands.DepCommand.DepCommand import usage [as 别名]
def test_help(self):
command = DepCommand(["help"], self.todolist, self.out, self.error)
command.execute()
self.assertEqual(self.output, "")
self.assertEqual(self.errors,
command.usage() + "\n\n" + command.help() + "\n")
示例3: test_no_subsubcommand
# 需要导入模块: from topydo.commands.DepCommand import DepCommand [as 别名]
# 或者: from topydo.commands.DepCommand.DepCommand import usage [as 别名]
def test_no_subsubcommand(self):
command = DepCommand([], self.todolist, self.out, self.error)
command.execute()
self.assertFalse(self.output)
self.assertEqual(self.errors, command.usage() + "\n")
self.assertFalse(self.todolist.is_dirty())
示例4: test_invalid_subsubcommand
# 需要导入模块: from topydo.commands.DepCommand import DepCommand [as 别名]
# 或者: from topydo.commands.DepCommand.DepCommand import usage [as 别名]
def test_invalid_subsubcommand(self):
command = DepCommand(["foo"], self.todolist, self.out, self.error)
command.execute()
self.assertFalse(self.output)
self.assertEqual(self.errors, command.usage() + "\n")
self.assertFalse(self.todolist.dirty)
示例5: test_dot1
# 需要导入模块: from topydo.commands.DepCommand import DepCommand [as 别名]
# 或者: from topydo.commands.DepCommand.DepCommand import usage [as 别名]
def test_dot1(self):
command = DepCommand(["dot"], self.todolist, self.out, self.error)
command.execute()
self.assertFalse(self.todolist.dirty)
self.assertEqual(self.output, "")
self.assertEqual(self.errors, command.usage() + "\n")
示例6: test_ls7
# 需要导入模块: from topydo.commands.DepCommand import DepCommand [as 别名]
# 或者: from topydo.commands.DepCommand.DepCommand import usage [as 别名]
def test_ls7(self):
command = DepCommand(["ls", "top", "99"], self.todolist, self.out, self.error)
command.execute()
self.assertFalse(self.todolist.is_dirty())
self.assertEqual(self.output, "")
self.assertEqual(self.errors, command.usage() + "\n")