Skip to content

Commit ae4e0ff

Browse files
committed
Seed random and numpy.random in top-level conftest.py
1 parent b5f8b6e commit ae4e0ff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import random
2+
import numpy as np
3+
import pytest
4+
5+
6+
@pytest.fixture(autouse=True, scope="session")
7+
def seed_random():
8+
random.seed(42)
9+
np.random.seed(42)

0 commit comments

Comments
 (0)