pytest-2.4.2: Windows 上的 colorama,插件/tmpdir 修复¶
pytest-2.4.2 是另一个错误修复版本
在 Windows 上需要 colorama 和更新的 py 库,因此 py.io.TerminalWriter() 现在使用 colorama 而不是其自己的 ctypes hack。(修复了 issue365)感谢 Paul Moore 提出此问题。
修复了对测试的“-k”匹配,其中“repr”和“attr”以及其他名称由于内部实现怪癖(别问)而导致错误的匹配,现在已正确实现。修复了 issue345。
避免 tmpdir 夹具创建过长的文件名,尤其是在使用参数化时 (issue354)
修复 pytest-pep8 和 pytest-flakes / pytest 交互(标记插件中的集合名称假定项始终具有函数,这对于这些插件等是不正确的)。感谢 Andi Zeidler。
为像 pytest-pep8 和 pytest-flakes 这样的插件引入 node.get_marker/node.add_marker API,以避免 node.keywords 伪字典的繁琐细节。已调整文档。
删除在启动时尝试“复制”stdout 的操作,因为它很糟糕。正常的捕获应该足以捕捉测试搞乱标准 FD 的可能性。
添加 pluginmanager.do_configure(config) 作为 config.do_configure() 的链接,以实现插件兼容性
像往常一样,文档位于 https://pytest.cn,并通过以下方式升级
pip install -U pytest
玩得开心,holger krekel