shell语言的提交正确性测试
shellwhat的Python项目详细描述
ShellWhat
shellwhat
使您能够为datacamp上的交互式shell练习编写提交正确性测试(sct)。
- 如果你是新教的数据营,看看https://instructor-support.datacamp.com。
- 如果您想了解什么是sct以及它们是如何工作的,请特别访问this article。
- 有关
shellwhat
中所有功能的完整概述以及有关何时使用什么的文章,请参阅https://shellwhat.readthedocs.io。
安装
pip install shellwhat
开发
默认情况下,使用DummyParser
,它不解析shell代码。
因此,您不能运行需要此解析器的测试:
pytest -m "not osh"
如果您还想运行这些“解析器测试”, 有dockerfile可用于解析shell命令 Oil parser:
# Look in Makefile for details
export SHELLWHAT_PARSER='docker'
make test