def test_subsystem_validation(s): # Wrong state length. with pytest.raises(ValueError): s = Subsystem(s.network, (0, 0), s.node_indices) # Wrong state values. with pytest.raises(ValueError): s = Subsystem(s.network, (2, 0, 0), s.node_indices) # Disallow impossible states at subsystem level (we don't want to return a # phi-value associated with an impossible state). net = example_networks.simple() with pytest.raises(exceptions.StateUnreachableError): s = Subsystem(net, (0, 1, 0), s.node_indices)
def test_subsystem_validation(s): # Wrong state length. with pytest.raises(ValueError): s = Subsystem(s.network, (0, 0), s.node_indices) # Wrong state values. with pytest.raises(ValueError): s = Subsystem(s.network, (2, 0, 0), s.node_indices) # Disallow impossible states at subsystem level (we don't want to return a # phi-value associated with an impossible state). net = example_networks.simple() with pytest.raises(validate.StateUnreachableError): s = Subsystem(net, (0, 1, 0), s.node_indices)
def simple(): return example_networks.simple()