AELYRION-NOULITH-III / tests /test_input_validation.py
PureOne's picture
Add AELYRION-NOULITH III research v3.0.0 (hf.1)
d1c6c9a verified
Raw History Blame Contribute Delete
806 Bytes
import pytest
from noulith.protocols import root_profile, partition_valuations
from noulith.geometry import line_arrangement_generators, perfect_slice_matrix
@pytest.mark.parametrize('args',[(1.2,1,2),(1,1.0,2),(1,1,2.5),(True,1,2),(-1,1,2),(1,-1,2),(1,1,1)])
def test_root_profile_rejects_invalid_arguments(args):
with pytest.raises(ValueError):
root_profile(*args)
@pytest.mark.parametrize('budget',[1.0,-1,True,'2'])
def test_dp_rejects_invalid_budget(budget):
with pytest.raises(ValueError):
partition_valuations([0,0],budget)
def test_branch_normal_form_rejects_three_channel_exception():
import sympy as sp
with pytest.raises(ValueError):
line_arrangement_generators(sp.symbols('x y'))
with pytest.raises(ValueError):
perfect_slice_matrix(2)