Skip to content

Commit 55602ae

Browse files
committed
Update items test.
1 parent bdcdb34 commit 55602ae

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/data/items.slp

2.11 MB
Binary file not shown.

tests/test_peppi_py.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ def test_basic_game():
9898

9999
def test_items_support():
100100
# Replay with a Peach
101-
game = read_slippi('../peppi/tests/data/items.slp')
101+
game = read_slippi(Path(__file__).parent.joinpath('data/items.slp').as_posix())
102+
assert game.frames is not None
103+
assert game.frames.items is not None
102104

103-
item_types = Counter()
104-
for items in game.frames.items:
105-
item_types.update(items.type.to_pylist())
105+
item_types = Counter(game.frames.items.type.values.to_numpy())
106106

107107
# Peach turnip appears on 513 frames.
108108
assert len(item_types) == 1

0 commit comments

Comments
 (0)