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_stability_parameters(unstable_parameter_sets):
"""
Test that the correct exceptions are raised for unstable lagged connectivity
matricies
"""
# Unpack the parameter set fixture
stab_matrix, unst_matrix, message = unstable_parameter_sets
error_message = message + " should trigger an assertion error for "+\
"_var_network graph."
# Test the good parameter set
try:
pp._check_stability(stab_matrix)
# Ensure no exception is raised
except:
pytest.fail("Stable matrix set triggers exception incorrectly!")
# Ensure an exception is raised for a bad parameter set
with pytest.raises(AssertionError):
pp._check_stability(unst_matrix)
pytest.fail(error_message)
Test that the correct exceptions are raised for unstable lagged connectivity
matricies
"""
# Unpack the parameter set fixture
stab_matrix, unst_matrix, message = unstable_parameter_sets
error_message = message + " should trigger an assertion error for "+\
"_var_network graph."
# Test the good parameter set
try:
pp._check_stability(stab_matrix)
# Ensure no exception is raised
except:
pytest.fail("Stable matrix set triggers exception incorrectly!")
# Ensure an exception is raised for a bad parameter set
with pytest.raises(AssertionError):
pp._check_stability(unst_matrix)
pytest.fail(error_message)