Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为/mmt加入以下test case #181

Open
hdcola opened this issue Oct 1, 2021 · 0 comments
Open

为/mmt加入以下test case #181

hdcola opened this issue Oct 1, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@hdcola
Copy link
Contributor

hdcola commented Oct 1, 2021

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了。

@hdcola hdcola added the enhancement New feature or request label Oct 1, 2021
@hdcola hdcola added this to the 1003作业 milestone Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant