Deterministically frozen UUID's for your tests
Project description
pytest-frozen-uuids
Deterministically frozen UUID's for your tests.
Features
- Freeze UUID's globally and locally.
Installation
You can install "pytest-frozen-uuids" via pip from PyPI:
$ pip install pytest-frozen-uuids
Usage
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
@pytest.mark.freeze_uuids
def test_freeze_uuids():
import uuid
assert str(uuid.uuid4()) == "00000000-0000-0000-0000-000000000000"
Contributing
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.
License
Distributed under the terms of the MIT license, "pytest-frozen-uuids" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
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
Built Distribution
Hashes for pytest_frozen_uuids-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aec4c1b2bd490067aa415148b5d7fe9f5b45ff86fa59b2c7073c9ad01b4abd67 |
|
MD5 | 85c7a066db6246ab3477771f64ef5497 |
|
BLAKE2b-256 | c55c98af3d5bffcf725a794b28a2f10a309202c9b67318ee177e838d7ffba8c2 |