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

单测问题 #28

Closed
Qingqing1spider opened this issue Aug 12, 2020 · 2 comments
Closed

单测问题 #28

Qingqing1spider opened this issue Aug 12, 2020 · 2 comments

Comments

@Qingqing1spider
Copy link

老师您好,我看您的课程中我发现您每次写完单测函数之后不执行那个函数,是因为您的那个测试工具就会自动执行里面的函数吗?

@PegasusWang
Copy link
Owner

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 加上你的测试文件执行了

@Qingqing1spider
Copy link
Author

Qingqing1spider commented Feb 13, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants