Exemple #1
0
def test_threehump_dim_fail(outdim):
    """Test threehump dim exception"""
    with pytest.raises(IndexError):
        fx.threehump(outdim)
def test_threehump_bound_fail(outbound):
    """Test threehump bound exception"""
    with pytest.raises(ValueError):
        x = outbound(b["threehump"].low, b["threehump"].high, size=(3, 2))
        fx.threehump(x)
def test_threehump_output_size(common_minima, targetdim):
    """Test threehump output size."""
    assert fx.threehump(common_minima).shape == targetdim
Exemple #4
0
def test_threehump_output(common_minima):
    """Tests threehump function output."""
    assert np.array_equal(fx.threehump(common_minima), np.zeros(3))