用pytest运行cram测试。
pytest-cram的Python项目详细描述
py test cram:使用py.test运行cram测试
cram测试命令行应用程序。 pytest测试python应用程序。 pytest cram测试python命令行应用程序 通过使用pytest编写python api测试, 在cram中进行命令行测试。 两全其美!
使用量
一旦安装,将收集所有.t文件 运行cram,所以安装应该是所有需要的。
如果希望禁用cram测试以调用 pytest,do
py.test --nocram
要覆盖cram使用的shell,请执行
py.test --shell="C:\git\bash.exe"
或者设置CRAMSHELL环境变量
CRAMSHELL=/bin/bash py.test
如果你想禁用特定的cram测试, 在.ini文件中列出它们
[pytest] cramignore = file1.t pattern*.t
发布历史记录
0.2.0(2018-02-06)
已修复
- 修复了使用pytest>=3.3的测试。pytest添加了进度指标 测试版本3.3中的输出,这是测试不期望的。
0.1.1(2016-03-07)
已添加
添加了--shell命令行选项,现在检查CRAMSHELL 重写默认的/bin/shshell的环境变量。 (#3)
感谢Florian Rathgeber的贡献!
已更改
- 显式依赖于cram>=0.7。如果你想早点得到支持 克拉姆的版本,谢谢 file an issue。
0.1.0(2016-02-28)
初版pytest-cram!支持Python2.7+和3.3+。