Skip to content

为/mmt加入以下test case #181

@hdcola

Description

@hdcola

def test_mmt_all_para(aapl):
# 用户会发出所有的参数
msg = "/mmt aapl 20210101 20210820"

def test_mmt_3para(aapl):
# 用户会发出三个参数
msg = "/mmt aapl 20210101"

def test_mmt_2para(aapl):
# 用户会发出两个参数
msg = "/mmt aapl"

def test_mmt_1para(aapl):
# 用户会发出一个参数
msg = "/mmt"

def test_mmt_error():
# 用户会发出错误的参数
# 多发出一个参数
msg = "/mmt aapl 20210101 20210820 20210820"
# 发出错误的end date
msg = "/mmt aapl 20210101 20210920"
# 发出错误的start date
msg = "/mmt aapl 10101 20210920"

以上PR请提到 hddev里,在这个分支里的 tests/cmdproc 里已经建立了相关的测试文件(详见 000b424 )。

注意,还需要将以前的mmtcmd.py文件里直接回调的处理command函数进行修改,将处理消息、返回值、甚至button的数据都放到一个函数里去处理。这样就可以非常方便的build这个test了。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions