Zope Pytest集成
zope.pytest的Python项目详细描述
zope.pytest
简介
这个包包含一组帮助函数来测试zope/grok 使用pytest。它目前缺乏对治疗的特殊支持
核心功能
zope.pytest.setup.create_app
- this function creates a WSGI app object which utilizes a temporary db.
zope.pytest.setup.configure
- this function parses ZCML files and initializes the component registry
简单示例:
import my.project from zope.pytest import create_app, configure from my.project import Root def pytest_funcarg__app(request): return create_app(request, Root()) def pytest_funcarg__config(request): return configure(request, my.project, 'ftesting.zcml') def test_hello(app, config): assert 1 == 1
更改
0.1(2011-03-05)
初步实施