Skip to main content

Deterministically frozen UUID's for your tests

Project description


CI image

Deterministically frozen UUID's for your tests.


  • Freeze UUID's globally and locally.


You can install "pytest-frozen-uuids" via pip from PyPI:

$ pip install pytest-frozen-uuids


Freeze UUID's by using the freeze_uuids fixture:

def test_freeze_uuids(freeze_uuids):
    import uuid
    assert str(uuid.uuid4()) == "00000000-0000-0000-0000-000000000000"

Or by using the freeze_uuids marker:

import pytest

def test_freeze_uuids():
    import uuid
    assert str(uuid.uuid4()) == "00000000-0000-0000-0000-000000000000"


Contributions are very welcome. Tests can be run with tox. You can later check coverage with coverage combine && coverage html. Please try to keep coverage at least the same before you submit a pull request.


Distributed under the terms of the MIT license, "pytest-frozen-uuids" is free and open source software


If you encounter any problems, please file an issue along with a detailed description.


This Pytest plugin was generated with Cookiecutter along with @hackebrot's Cookiecutter-pytest-plugin template.

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-frozen-uuids-0.2.tar.gz (4.9 kB view hashes)

Uploaded source

Built Distribution

pytest_frozen_uuids-0.2-py3-none-any.whl (4.9 kB view hashes)

Uploaded py3

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