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.
Release files for pytest-frozen-uuids 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-frozen-uuids-0.3.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_frozen_uuids-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / pytest-frozen-uuids-0.3.tar.gz
| Download URL | pytest-frozen-uuids-0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a3754239a8e2a588ffa5f99bc5857eaabc2947198421cfb5e98619aef2a46e5
|
|
BLAKE2b-256 checksum How to use checksums |
8a349064db1e7e4758a3c3ec1a637aabb532ebc58028458f92d8a0802aaa9d4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / pytest_frozen_uuids-0.3-py3-none-any.whl
| Download URL | pytest_frozen_uuids-0.3-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aec4c1b2bd490067aa415148b5d7fe9f5b45ff86fa59b2c7073c9ad01b4abd67
|
|
BLAKE2b-256 checksum How to use checksums |
c55c98af3d5bffcf725a794b28a2f10a309202c9b67318ee177e838d7ffba8c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|