Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_holdertable_output_size(common_minima, targetdim):
"""Test holdertable output size."""
assert fx.holdertable(common_minima).shape == targetdim
def test_holdertable_bound_fail(outbound):
"""Test holdertable bound exception"""
with pytest.raises(ValueError):
x = outbound(b["holdertable"].low, b["holdertable"].high, size=(3, 2))
fx.holdertable(x)
def test_holdertable_output(x, minima):
"""Tests holdertable function output."""
assert np.isclose(fx.holdertable(x), minima).all()
def test_holdertable_dim_fail(outdim):
"""Test holdertable dim exception"""
with pytest.raises(IndexError):
fx.holdertable(outdim)