Skip to content

Commit

Permalink
Merge pull request #126 from gavinp/2.0-test-create-with-position
Browse files Browse the repository at this point in the history
Add test for creating items with position.
  • Loading branch information
redruin1 authored Jan 3, 2025
2 parents c35ddf5 + 8af22f7 commit 7bf15e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ def test_create_with_position(self):
active_provider_chest = new_entity('active-provider-chest', tile_position=(10, 10))
assert active_provider_chest.position.x == 10.5 and active_provider_chest.position.y == 10.5

def test_create_with_position(self):
iron_chest = new_entity('iron-chest', tile_position=(3,3))
assert iron_chest.position.x == 3.5 and iron_chest.position.y == 3.5

active_provider_chest = new_entity('active-provider-chest', tile_position=(10,10))
assert active_provider_chest.position.x == 10.5 and active_provider_chest.position.y == 10.5

def test_set_position(self):
iron_chest = Container("iron-chest")
iron_chest.position = (1.23, 1.34)
Expand Down

0 comments on commit 7bf15e3

Please sign in to comment.