考试失败最好有幽默感。
pytest-joke的Python项目详细描述
pytest笑话
做一些健康的(或不健康的)量或幽默的测试会更好!
这是一个完全无用的插件,创建它是为了在为pytest创建插件方面获得一些实践。
由pyjokes提供动力。
安装
$ pip install pytest-joke
用法
安装插件后,每次测试运行导致失败时,终端都会输出一个随机笑话,试图让您振作起来。
Humor-powered output enabled ?. plugins: mock-1.10.4, joke-0.1.0 collected 2 items test_joke.py .F [100%]===================================FAILURES=================================== _________________________________ test_failed __________________________________ def test_failed(): > assert 1==2 E assert 1==2 test_joke.py:7: AssertionError======================1 failed, 1 passed in 0.03 seconds====================== There are two ways to write error-free programs; only the third one works.
待办事项
- 使插件可配置:打开/关闭、语言、笑话类别、笑话数量
许可证
根据MIT许可证的条款分发,pytest笑话是 免费开源软件。