当前位置: 首页>>代码示例>>Python>>正文


Python DepCommand.DepCommand类代码示例

本文整理汇总了Python中topydo.commands.DepCommand.DepCommand的典型用法代码示例。如果您正苦于以下问题:Python DepCommand类的具体用法?Python DepCommand怎么用?Python DepCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DepCommand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_dot1

    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")
开发者ID:bram85,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例2: test_add5

    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")
开发者ID:rameshg87,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例3: test_dot3

    def test_dot3(self):
        command = DepCommand(["dot", "99"], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.dirty)
        self.assertEqual(self.output, "")
        self.assertEqual(self.errors, "Invalid todo number given." + "\n")
开发者ID:bram85,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例4: test_invalid_subsubcommand

    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)
开发者ID:bram85,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例5: test_ls7

    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")
开发者ID:netimen,项目名称:topydo,代码行数:7,代码来源:DepCommandTest.py

示例6: test_ls3

    def test_ls3(self):
        command = DepCommand(["ls", "to", "3"], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.dirty)
        self.assertEqual(self.output, "|  1| Foo id:1\n")
        self.assertEqual(self.errors, "")
开发者ID:MinchinWeb,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例7: test_help

    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")
开发者ID:rameshg87,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例8: test_add4

    def test_add4(self):
        command = DepCommand(["add", "A", "3"], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.dirty)
        self.assertEqual(self.output, "")
        self.assertEqual(self.errors, "Invalid todo number given.\n")
开发者ID:MinchinWeb,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例9: test_ls1

    def test_ls1(self):
        command = DepCommand(["ls", "1", "to"], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.dirty)
        self.assertEqual(self.output, "|  2| Bar p:1\n|  3| Baz p:1\n")
        self.assertEqual(self.errors, "")
开发者ID:MinchinWeb,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例10: test_add19

    def test_add19(self):
        command = DepCommand(["add", "4", "children-of", "5"], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.dirty)
        self.assertEqual(self.output, "")
        self.assertEqual(self.errors, "")
开发者ID:MinchinWeb,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例11: test_no_subsubcommand

    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())
开发者ID:rameshg87,项目名称:topydo,代码行数:7,代码来源:test_dep_command.py

示例12: test_ls4

    def test_ls4(self):
        command = DepCommand(["ls", "to", "99"], self.todolist, self.out, self.error)
        command.execute()

        self.assertFalse(self.todolist.is_dirty())
        self.assertEqual(self.output, "")
        self.assertEqual(self.errors, "Invalid todo number given.\n")
开发者ID:netimen,项目名称:topydo,代码行数:7,代码来源:DepCommandTest.py

示例13: test_add8

    def test_add8(self):
        command = DepCommand(["add", "1", "partof", "4"], self.todolist, self.out, self.error)
        command.execute()

        self.assertTrue(self.todolist.is_dirty())
        self.assertTrue(self.todolist.todo(1).has_tag('p', '2'))
        self.assertEqual(self.output, "")
        self.assertEqual(self.errors, "")
开发者ID:netimen,项目名称:topydo,代码行数:8,代码来源:DepCommandTest.py

示例14: test_add9

    def test_add9(self):
        command = DepCommand(["add", "Foo", "to", "4"], self.todolist, self.out, self.error)
        command.execute()

        self.assertTrue(self.todolist.dirty)
        self.assertTrue(self.todolist.todo(4).has_tag("p", "1"))
        self.assertEqual(self.output, "")
        self.assertEqual(self.errors, "")
开发者ID:MinchinWeb,项目名称:topydo,代码行数:8,代码来源:test_dep_command.py

示例15: gc_helper

    def gc_helper(self, p_subcommand):
        command = DepCommand([p_subcommand], self.todolist, self.out, self.error)
        command.execute()

        self.assertTrue(self.todolist.dirty)
        self.assertFalse(self.output)
        self.assertFalse(self.errors)
        self.assertFalse(self.todolist.todo(5).has_tag("p", "99"))
开发者ID:MinchinWeb,项目名称:topydo,代码行数:8,代码来源:test_dep_command.py


注:本文中的topydo.commands.DepCommand.DepCommand类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。