mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 06:35:46 +02:00
16 lines
387 B
Python
16 lines
387 B
Python
from uuid import UUID
|
|
|
|
import pytest
|
|
from pytest_mock import MockerFixture
|
|
|
|
|
|
@pytest.fixture()
|
|
def deterministic_uuids(mocker: MockerFixture) -> MockerFixture:
|
|
side_effect = (
|
|
UUID(f"00000000-0000-4000-8000-{i:012}", version=4) for i in range(10000)
|
|
)
|
|
return mocker.patch("uuid.uuid4", side_effect=side_effect)
|
|
|
|
|
|
pytest.register_assert_rewrite("tests.memory_assert")
|