跳转到主要内容

Faker与pytest框架的集成。

项目描述

Faker_ 与pytest_ 测试执行器的集成
==========================================

.. image:: http://img.shields.io/travis/pytest-dev/pytest-faker.svg
:目标:https://travis-ci.org/pytest-dev/pytest-faker
.. 图像:https://img.shields.io/pypi/pyversions/pytest-qt.svg
:目标:https://pypi.python.org/pypi/pytest-qt/
.. 图像:http://img.shields.io/pypi/v/pytest-faker.svg
:目标:https://pypi.python.org/pypi/pytest-faker
.. 图像:http://img.shields.io/coveralls/pytest-dev/pytest-faker.svg
:目标:https://coveralls.io/r/pytest-dev/pytest-faker
.. 图像:https://readthedocs.org/projects/pytest-faker/badge/?version=latest
:目标:https://readthedocs.org/projects/pytest-faker/?badge=latest
:替代:文档状态

pytest-faker 为pytest_ 运行器下的测试提供了Faker_ 修复件,以简化Faker_ 的使用。

.. _Faker: https://faker.readthedocs.io/
.. _pytest: https://pytest.cn/
.. _修复件: https://pytest.cn/latest/fixture.html

安装 pytest-faker
-------------------------

::

pip install pytest-faker

示例
-------

Faker_ 和pytest_ 集成的示例。


tests/test_faker.py

.. 代码块:: python

from faker.generator import Generator

def test_faker(faker)
"""Faker 工厂是一个修复件."""
assert isinstance(faker, Generator)
assert isinstance(faker.name(), str)


许可证
-------

本软件采用 `MIT 许可证 <http://en.wikipedia.org/wiki/MIT_License>`_。

© 2015 Anatoly Bubenkov, Oleg Pidsadnyi 和其他人

作者
=======

`Anatoly Bubenkov <bubenkoff@gmail.com>`_
原始想法和实现

以下人员为 `pytest-faker` 做出了贡献,按字母顺序排列

* `Jeff Widman <jeff@jeffwidman.com>`_
* `Oleg Pidsadnyi <oleg.pidsadnyi@gmail.com>`_

变更日志
=========

2.0.0
-----

- 切换到最新的 Faker (jeffwidman, bubenkoff)

1.1.0
-----

- 切换到会话作用域的修复件 (bubenkoff, thedrow)

1.0.0
-----

- 首次发布 (bubenkoff)

项目详细信息


下载文件

下载适用于您的平台的文件。如果您不确定要选择哪个,请了解有关 安装包 的更多信息。

源分发

pytest-faker-2.0.0.tar.gz (2.8 kB 查看散列)

上传时间

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面