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


Python DoCommand.execute_post_archive_actions方法代码示例

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


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

示例1: test_activated_todos2

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_activated_todos2(self):
        command = DoCommand(["7"], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertEqual(self.output, "Completed: x {} Subtodo of inactive p:2\n".format(self.today))
        self.assertEqual(self.errors, "")
开发者ID:rcraggs,项目名称:topydo,代码行数:9,代码来源:test_do_command.py

示例2: test_expr_do3

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_expr_do3(self):
        command = DoCommand(["-e", "@test", "due:2015-06-03", "+project"],
                            self.todolist, self.out, self.error, None)
        command.execute()
        command.execute_post_archive_actions()

        self.assertFalse(self.todolist.dirty)
开发者ID:rcraggs,项目名称:topydo,代码行数:9,代码来源:test_do_command.py

示例3: test_help

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_help(self):
        command = DoCommand(["help"], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertEqual(self.output, "")
        self.assertEqual(self.errors,
                         command.usage() + "\n\n" + command.help() + "\n")
开发者ID:rcraggs,项目名称:topydo,代码行数:10,代码来源:test_do_command.py

示例4: test_invalid2

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_invalid2(self):
        command = DoCommand(["AAA"], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

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

示例5: test_empty

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_empty(self):
        command = DoCommand([], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertFalse(self.todolist.dirty)
        self.assertFalse(self.output)
        self.assertEqual(self.errors, command.usage() + "\n")
开发者ID:rcraggs,项目名称:topydo,代码行数:10,代码来源:test_do_command.py

示例6: test_multi_do4

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_multi_do4(self):
        command = DoCommand(["99", "3"], self.todolist, self.out, self.error,
                            _no_prompt)
        command.execute()
        command.execute_post_archive_actions()

        self.assertFalse(self.todolist.todo(3).is_completed())
        self.assertEqual(self.errors, "Invalid todo number given: 99.\n")
开发者ID:rcraggs,项目名称:topydo,代码行数:10,代码来源:test_do_command.py

示例7: _recurrence_helper

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def _recurrence_helper(self, p_flags):
        command = DoCommand(p_flags, self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.dirty)
        self.assertEqual(self.errors, "")
        self.assertEqual(self.todolist.count(), 12)
开发者ID:rcraggs,项目名称:topydo,代码行数:10,代码来源:test_do_command.py

示例8: test_expr_do4

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_expr_do4(self):
        """ Don't do anything with unrelevant todo items. """
        command = DoCommand(["-e", "Foo"], self.todolist, self.out, self.error,
                            None)
        command.execute()
        command.execute_post_archive_actions()

        self.assertFalse(self.todolist.dirty)
开发者ID:rcraggs,项目名称:topydo,代码行数:10,代码来源:test_do_command.py

示例9: test_expr_do2

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_expr_do2(self):
        command = DoCommand(["-e", "@test", "due:2015-06-03"], self.todolist,
                            self.out, self.error, None)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.dirty)
        self.assertEqual(self.output, "Completed: x {} a @test with due:2015-06-03\n".format(self.today))
        self.assertEqual(self.errors, "")
开发者ID:rcraggs,项目名称:topydo,代码行数:11,代码来源:test_do_command.py

示例10: test_multi_do3

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_multi_do3(self):
        command = DoCommand(["3", "3"], self.todolist, self.out, self.error,
                            _no_prompt)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.todo(3).is_completed())
        self.assertEqual(self.output,
                         "Completed: x {} Baz p:1\n".format(self.today))
开发者ID:rcraggs,项目名称:topydo,代码行数:11,代码来源:test_do_command.py

示例11: test_do_custom_date3

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_do_custom_date3(self):
        command = DoCommand(["--date=2014-11-18", "3"], self.todolist,
                            self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.dirty)
        self.assertEqual(self.output, "Completed: x 2014-11-18 Baz p:1\n")
        self.assertEqual(self.errors, "")
开发者ID:rcraggs,项目名称:topydo,代码行数:11,代码来源:test_do_command.py

示例12: test_do_custom_date2

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_do_custom_date2(self):
        command = DoCommand(["-d", "2014-11-18", "1"], self.todolist, self.out,
                            self.error, _yes_prompt)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.dirty)
        self.assertEqual(self.output, "|  2| Bar p:1\n|  3| Baz p:1\nCompleted: x 2014-11-18 Bar p:1\nCompleted: x 2014-11-18 Baz p:1\nCompleted: x 2014-11-18 Foo id:1\n")
        self.assertEqual(self.errors, "")
开发者ID:rcraggs,项目名称:topydo,代码行数:11,代码来源:test_do_command.py

示例13: test_multi_do5

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_multi_do5(self):
        """
        Check output when all supplied todo numbers are invalid.
        """
        command = DoCommand(["99", "15"], self.todolist, self.out, self.error,
                            _no_prompt)
        command.execute()
        command.execute_post_archive_actions()

        self.assertEqual(self.errors, "Invalid todo number given: 99.\nInvalid todo number given: 15.\n")
开发者ID:rcraggs,项目名称:topydo,代码行数:12,代码来源:test_do_command.py

示例14: test_do_custom_date4

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_do_custom_date4(self):
        command = DoCommand(["-d", "foo", "3"], self.todolist, self.out,
                            self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.dirty)
        self.assertEqual(self.output,
                         "Completed: x {} Baz p:1\n".format(self.today))
        self.assertEqual(self.errors, "")
开发者ID:rcraggs,项目名称:topydo,代码行数:12,代码来源:test_do_command.py

示例15: test_do_regex1

# 需要导入模块: from topydo.commands.DoCommand import DoCommand [as 别名]
# 或者: from topydo.commands.DoCommand.DoCommand import execute_post_archive_actions [as 别名]
    def test_do_regex1(self):
        command = DoCommand(["baz"], self.todolist, self.out, self.error)
        command.execute()
        command.execute_post_archive_actions()

        self.assertTrue(self.todolist.dirty)
        self.assertTrue(self.todolist.todo(3).is_completed())
        self.assertEqual(self.output,
                         "Completed: x {} Baz p:1\n".format(self.today))
        self.assertEqual(self.errors, "")
开发者ID:rcraggs,项目名称:topydo,代码行数:12,代码来源:test_do_command.py


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