# Path: siebenapp/tests/dsl.py
# def build_goaltree(*goal_prototypes, message_fn=None):
#     goals = [(g.goal_id, g.name, g.open) for g in goal_prototypes]
#     edges = [
#         (g.goal_id, e, EdgeType.PARENT) for g in goal_prototypes for e in g.children
#     ] + [(g.goal_id, e, EdgeType.BLOCKER) for g in goal_prototypes for e in g.blockers]
#     selection = {g.goal_id for g in goal_prototypes if g.select == selected}
#     prev_selection = {g.goal_id for g in goal_prototypes if g.select == previous}
#     assert len(selection) == 1
#     assert len(prev_selection) <= 1
#     selection_id = selection.pop()
#     return Goals.build(
#         goals,
#         edges,
#         [
#             ("selection", selection_id),
#             (
#                 "previous_selection",
#                 prev_selection.pop() if prev_selection else selection_id,
#             ),
#         ],
#         message_fn,
#     )
# 
# def open_(goal_id, name, children=None, blockers=None, select=None):
#     return _build_goal_prototype(goal_id, name, True, children, blockers, select)


import pytest
from siebenapp.tests.dsl import build_goaltree, open_



def test_two_parents_for_one_goal_is_forbidden():
    with pytest.raises(AssertionError):
        build_goaltree(

# Path: siebenapp/tests/dsl.py
# def build_goaltree(*goal_prototypes, message_fn=None):
#     goals = [(g.goal_id, g.name, g.open) for g in goal_prototypes]
#     edges = [
#         (g.goal_id, e, EdgeType.PARENT) for g in goal_prototypes for e in g.children
#     ] + [(g.goal_id, e, EdgeType.BLOCKER) for g in goal_prototypes for e in g.blockers]
#     selection = {g.goal_id for g in goal_prototypes if g.select == selected}
#     prev_selection = {g.goal_id for g in goal_prototypes if g.select == previous}
#     assert len(selection) == 1
#     assert len(prev_selection) <= 1
#     selection_id = selection.pop()
#     return Goals.build(
#         goals,
#         edges,
#         [
#             ("selection", selection_id),
#             (
#                 "previous_selection",
#                 prev_selection.pop() if prev_selection else selection_id,
#             ),
#         ],
#         message_fn,
#     )
# 
# def open_(goal_id, name, children=None, blockers=None, select=None):
#     return _build_goal_prototype(goal_id, name, True, children, blockers, select)


# Path: siebenapp/tests/test_dsl.py
import pytest
from siebenapp.tests.dsl import build_goaltree, open_




def test_two_parents_for_one_goal_is_forbidden():
    with pytest.raises(AssertionError):
        build_goaltree(

            open_(1, "First parent of 3", [2, 3]),