Skip to content

Commit

Permalink
Set random seed for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wbenoit26 committed Feb 5, 2025
1 parent 6f0514e commit 8cb41a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import random

import numpy as np
import pytest
import torch
from scipy.special import erfinv


@pytest.fixture(autouse=True)
def seed_everything():
seed = 101589
torch.manual_seed(seed)
np.random.seed(seed)
random.seed(seed)


@pytest.fixture
def compare_against_numpy():
"""
Expand Down

0 comments on commit 8cb41a0

Please sign in to comment.