Exemplo n.º 1
0
def test_option_empty():
    with pytest.raises(ValueError):
        assert option(Ta, Tb)(prepare([Nc]))
Exemplo n.º 2
0
def test_option():
    opt = option(Ta, Tb, Tc)
    for node in [Na, Nb]:
        assert opt(prepare([node])) == Pair([node], [])