DIRACGrid / DIRACGrid/diracx

Frozen time does not apply on UUIDs

Open
#548 3 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
19
Forks
45
Avg merge
4d 23h
Merged PRs (30d)
12

Description

With the following code:

```py
@pytest.fixture
async def some_function(
frozen_time: freezegun.FreezeGun
):
raise ValueError(datetime.now(timezone.utc), extract_timestamp_from_uuid7(str(uuid7())))
```

We see that the `datetime.now` is really frozen, but not the uuid:

```
ValueError: (FakeDatetime(2012, 1, 14, 0, 0, tzinfo=datetime.timezone.utc), FakeDatetime(2025, 5, 21, 12, 48, 51, 900000, tzinfo=datetime.time
zone.utc))
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.