-
Notifications
You must be signed in to change notification settings - Fork 29
test_same_millisecond_overflow is non-deterministic #55
Copy link
Copy link
Open
Description
Occasionally, test_same_millisecond_overflow fails, about 1 in 20 times or so:
bash-5.2$ python -m pytest
======================== test session starts =========================
platform linux -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /[...]/python-ulid
configfile: pyproject.toml
collected 69 items
tests/test_base32.py ............. [ 18%]
tests/test_cli.py .............. [ 39%]
tests/test_ulid.py .......................................... [100%]
========================= 69 passed in 1.05s =========================
bash-5.2$ python -m pytest
======================== test session starts =========================
platform linux -- Python 3.12.12, pytest-9.0.2, pluggy-1.6.0
rootdir: /[...]/python-ulid
configfile: pyproject.toml
collected 69 items
tests/test_base32.py ............. [ 18%]
tests/test_cli.py .............. [ 39%]
tests/test_ulid.py ......F................................... [100%]
============================== FAILURES ==============================
___________________ test_same_millisecond_overflow ___________________
@freeze_time()
def test_same_millisecond_overflow() -> None:
ULID.provider.prev_randomness = constants.MAX_RANDOMNESS
> with pytest.raises(ValueError, match="Randomness within same millisecond exhausted"):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E Failed: DID NOT RAISE <class 'ValueError'>
tests/test_ulid.py:73: Failed
====================== short test summary info =======================
FAILED tests/test_ulid.py::test_same_millisecond_overflow - Failed: DID NOT RAISE <class 'ValueError'>
==================== 1 failed, 68 passed in 1.22s ====================
bash-5.2$
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels