[c330f8]: / tests / conftest.py

Download this file

18 lines (12 with data), 415 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import numpy as np
import pandas as pd
import pytest
from src.config import settings
from src.cvd_risk_scores.modules import typings
@pytest.fixture
def rng() -> np.random.Generator:
"""Construct a new Random Generator using the seed specified in settings.
Returns:
numpy.random.Generator: a Random Generator based on BitGenerator(PCG64)
"""
return np.random.default_rng(settings.SEED)