pytest的插件,为fixture提供工具
pytest-fixture-tools的Python项目详细描述
pytest fixture tools:pytest fixture tools插件
pytest-fixture-tools包是一个pytest插件,它为fixture提供各种工具
安装
pip install pytest-fixture-tools
使用量
如果您已经安装了pytest-fixture-toolsplugin,那么您可以使用它的一个命令
--show-fixture-duplicates-将收集所有设备,并为每个设备打印一个副本列表。
使用--show-fixture-duplicates,您可以使用--fixture name_of_fixture选项获取仅用于特定设备的重复项列表
py.test tests/ --show-fixture-duplicates --fixture order
输出可以如下所示:
========================================== test session starts ========================================== platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/batman/.virtualenvs/arkham-city/bin/python Tests are shuffled using seed number 355495648184. cachedir: /home/batman/.virtualenvs/arkham-city/.cache plugins: fixture-tools, random, bdd-splinter, pep8, cov, contextfixture, bdd, xdist, instafail, cache collected 2347 items / 1 skipped ------------------------------------------------- order ------------------------------------------------- tests/fixtures/order.py:30 tests/unit/api/conftest.py:261
接触
如果您有问题、错误报告、建议等,请在 那张GitHub project page
变更日志
1.0.0
- 首次公开发行