Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/syntax/test_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,32 @@ def test_behavior_list_actions():
assert tuple(actions) == ((1, 4, 9), (5,))


def test_behavior_take_none():
scenario = compileScenic(
"""
behavior Foo():
take None
take 7
ego = new Object with behavior Foo
"""
)
actions = sampleEgoActions(scenario, maxSteps=2)
assert tuple(actions) == (None, 7)


def test_behavior_take_empty_tuple():
scenario = compileScenic(
"""
behavior Foo():
take ()
take 7
ego = new Object with behavior Foo
"""
)
actions = sampleEgoActions(scenario, maxSteps=2)
assert tuple(actions) == (None, 7)


# Various errors


Expand Down
Loading