单测问题
Qingqing1spider opened this issue · comments
老师您好,我看您的课程中我发现您每次写完单测函数之后不执行那个函数,是因为您的那个测试工具就会自动执行里面的函数吗?
hi, readme 里有说明哈。使用的是 whenchanged 监控文件变动之后自动执行 pytest。你可以安装 when-changed 和 `pip install pytest' 之后,在你的 .bashrc 或者.zshrc 加入这个函数:
# pip install when-changed
function pytest_monitor_run() {
when-changed -r -v -1 "$1" pytest -s "$1"
}
然后就可以使用 pytest_monitor_run 加上你的测试文件执行了
哦哦好的,看到了,谢谢老师
…------------------ 原始邮件 ------------------
发件人: "PegasusWang/python_data_structures_and_algorithms" <notifications@github.com>;
发送时间: 2021年2月11日(星期四) 下午4:54
收件人: "PegasusWang/python_data_structures_and_algorithms"<python_data_structures_and_algorithms@noreply.github.com>;
抄送: "蜘蛛小弟233"<1839413455@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [PegasusWang/python_data_structures_and_algorithms] 单测问题 (#28)
hi, readme 里有说明哈。使用的是 whenchanged 监控文件变动之后自动执行 pytest。你可以安装 when-changed 和 `pip install pytest' 之后,在你的 .bashrc 或者.zshrc 加入这个函数:
# pip install when-changed function pytest_monitor_run() { when-changed -r -v -1 "$1" pytest -s "$1" }
然后就可以使用 pytest_monitor_run 加上你的测试文件执行了
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.