skillfed

pytest-faker

Faker integration with the pytest framework.

pytest-faker v2.0.0 88.5K downloads/30d#13,720 on PyPI41
Permissive license MIT license Abandoned released

What it is and what it does

pytest-faker is a thin integration layer that exposes the Faker library as a pytest fixture, allowing test functions to receive a Faker generator instance by declaring a `faker` parameter. Instead of instantiating Faker manually in each test, you get it injected as a session-scoped fixture, simplifying the setup of fake data generation for testing.

The package has been unmaintained since its latest release on 2016-12-19 and carries no runtime dependencies beyond pytest and Faker themselves. Its age and lack of updates create significant uncertainty about compatibility with modern versions of either tool.

Use it for:

  • Generate fake names, addresses, or email addresses in unit tests without manual Faker instantiation.
  • Create consistent test data across multiple test functions using a shared session-scoped faker fixture.
  • Reduce boilerplate in test files by relying on pytest's fixture injection instead of explicit Faker setup.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides pytest fixtures that integrate the Faker library for generating fake data in test functions.

No. The package is abandoned (latest release 2016-12-19, last commit 2020-05-14) with high install friction, making it risky. Faker likely now provides native pytest integration or the community has moved to maintained alternatives. Verify current Faker documentation before considering this package.

Install

pytest-faker on PyPI

pip

pip install pytest-faker

uv

uv add pytest-faker

poetry

poetry add pytest-faker

Installing pytest-faker

Before you install

High install friction and abandoned maintenance status. The package has not been updated since 2016-12-19, with the last repository commit in 2020-05-14. No active maintenance or security updates are expected.

License in practice

Licensed under MIT license, a permissive license that allows commercial and private use with minimal restrictions, making it safe from a licensing perspective.

Quickstart

pip install pytest-faker

# In your test file:
def test_faker(faker):
    from faker.generator import Generator
    assert isinstance(faker, Generator)
    assert isinstance(faker.name(), str)

Requires pytest and Faker to be installed; compatibility with modern versions is unclear given the package's age and lack of maintenance.

Verify before relying

  • Whether the package works with current versions of pytest and Faker, given no updates since 2016-12-19.
  • Whether the package is compatible with Python versions beyond 3.4, which was the latest listed in classifiers.
  • Whether Faker itself now provides native pytest integration that supersedes this package.

Package facts

License MIT license (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 3,525 days since the last release
Last repo commit
First released
Downloads 88,524/month — #13,720 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest-faker-2.0.0.tar.gz

Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.0Programming Language :: Python :: 3.1Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Software Development :: LibrariesTopic :: Software Development :: TestingTopic :: Utilities

Tags

pytest faker fixturesfake data generation testingpytest test data fixturesfaker pytest integrationgenerate mock data pytesttest fixtures fake names addresses
abandonedtest-fixtures

More Libraries packages