pytest-faker is a plugin for pytest that provides access to Faker fixtures for generating fake data in tests. Current version is 2.0.0. The library is actively maintained by the pytest-dev organization, with releases following changes to Faker and pytest.
pip install pytest-fakerVerified import paths — ran on the pinned version, not inferred.
Write a test that uses the 'faker' fixture to generate fake data. No imports needed beyond pytest.
Rename fixture usage from 'fake' to 'faker'.
Use 'faker.seed_instance(12345)' or the 'faker_seed' fixture.
Use 'faker_seed' fixture per test function to control reproducibility without cross-test contamination.