Skip to content

Commit

Permalink
test: add tests for actor health
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Oct 22, 2024
1 parent 2747647 commit 85d14c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/endstone_test/tests/on_player_join/test_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ def test_player_experience(player: Player):
assert player.exp_progress == current_exp_progress


def test_player_health(player: Player):
assert player.max_health == 20
current_health = player.health
assert 0 <= current_health <= player.max_health

player.health = 11
assert player.health == 11

player.health = current_health
assert player.health == current_health


def test_player_attributes(player: Player):
assert abs(player.fly_speed - 0.05) <= 0.00001
assert abs(player.walk_speed - 0.10) <= 0.00001
Expand Down

0 comments on commit 85d14c9

Please sign in to comment.