Skip to content

Commit 2506619

Browse files
committed
test(skore-hub-project): Make skrub reproducible
1 parent 816cf32 commit 2506619

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

skore-hub-project/tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from datetime import datetime, timezone
2+
from functools import partial
23
from unittest.mock import Mock
34
from urllib.parse import urljoin
45

@@ -155,7 +156,10 @@ def monkeypatch_skrub(monkeypatch):
155156
156157
https://github.com/skrub-data/skrub/blob/35f573ce586fe61ef2c72f4c0c4b188ebf2e664b/skrub/_reporting/_html.py#L153
157158
"""
159+
from skrub._dataframe import sample
160+
158161
monkeypatch.setattr("secrets.token_hex", lambda: "<token>")
162+
monkeypatch.setattr("skrub._dataframe.sample", partial(sample, seed=42))
159163

160164

161165
@fixture

0 commit comments

Comments
 (0)