示例#1
0
文件: init.py 项目: the-cc-dev/sen
    def __init__(self):
        self.d = DockerBackend()

        self.loop, self.ui = get_app_in_loop(PALLETE)

        self.ui.commander = Commander(self.ui, self.d)

        self.rt_thread = threading.Thread(target=self.realtime_updates,
                                          daemon=True)
        self.rt_thread.start()
示例#2
0
def test_commander():
    com = Commander(None, None)
    c = com.get_command("test test-arg")
    assert c.arguments.test_arg is True
    assert c.run() == 42
示例#3
0
def test_command_aliases():
    com = Commander(None, None)
    c = com.get_command("mango x")
    assert c.arguments.test_opt is True
    assert c.run() == 42