Skip to content

Commit

Permalink
Improve confusing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesnyder committed Nov 7, 2024
1 parent 6515586 commit 31eb9ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_automatic_transitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ def test_automatic_transition(self, game):
game.grid.trigger_transitions(time=lambda: time.time() + 5)
assert game.grid.item_locations[(2, 2)].item_id == "sunflower_bud"

def test_null_target(self, game):
def test_item_with_no_auto_transition_target_gets_deleted_from_grid(self, game):
from dlgr.griduniverse.experiment import Item

# Item with no auto_transition_target defined:
item = Item(
{
"id": 1,
Expand All @@ -35,8 +36,8 @@ def test_null_target(self, game):
)
game.grid.item_locations[(2, 2)] = item

game.item_config["sunflower_sprout"]["auto_transition_target"] = None
game.grid.trigger_transitions(time=lambda: time.time() + 5)

assert (2, 2) not in game.grid.item_locations


Expand Down

0 comments on commit 31eb9ac

Please sign in to comment.