Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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)

Download files

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

Files for pytest-faker, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size pytest-faker-2.0.0.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page