Exemplo n.º 1
0
def test_no_random_seed(mock1, mock2, sampler):
    """Assert no seed is set if seed=None"""
    NestedSampler.setup_random_seed(sampler, None)
    mock1.assert_not_called()
    mock2.assert_not_called()
Exemplo n.º 2
0
def test_set_random_seed(mock1, mock2, sampler):
    """Test the correct functions are called when setting the random seed"""
    NestedSampler.setup_random_seed(sampler, 150914)
    mock1.assert_called_once_with(150914)
    mock2.assert_called_once_with(seed=150914)