Skip to main content

Faker integration with the pytest framework.

Project description

Faker_ integration with the pytest_ test runner

.. image::
.. image::
.. image::
.. image::
.. image::
:alt: Documentation Status

pytest-faker adds Faker fixtures_ for easy use of Faker_ for your tests under pytest_ runner.

.. _Faker:
.. _pytest:
.. _fixtures:

Install pytest-faker


pip install pytest-faker


An example of Faker_ and pytest_ integration.


.. code-block:: python

from faker.generator import Generator

def test_faker(faker):
"""Faker factory is a fixture."""
assert isinstance(faker, Generator)
assert isinstance(, str)


This software is licensed under the `MIT license <>`_.

© 2015 Anatoly Bubenkov, Oleg Pidsadnyi and others


`Anatoly Bubenkov <>`_
original idea and implementation

These people have contributed to `pytest-faker`, in alphabetical order:

* `Jeff Widman <>`_
* `Oleg Pidsadnyi <>`_



- Switch to a recent Faker (jeffwidman, bubenkoff)


- Switch to a session scoped fixture (bubenkoff, thedrow)


- initial release (bubenkoff)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-faker-2.0.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page