Skip to content

Commit 7c962ef

Browse files
committed
Add tests
1 parent f8b0a54 commit 7c962ef

7 files changed

Lines changed: 31 additions & 9 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
./record.plm
2+
./test.py
3+
./example.xdf
14
.ruff_cache/
25
.vscode/
36
.idea/

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ install:
33
@echo "--- 🚀 Installing project dependencies for dev ---"
44
poetry install --with dev
55

6+
.PHONY: test
7+
test:
8+
@echo "--- 🧪 Running tests ---"
9+
poetry run pytest
10+
611
.PHONY: lint
712
lint:
813
@echo "--- 🧹 Linting code ---"

test.py

Whitespace-only changes.

tests/data/record.plm

15.8 MB
Binary file not shown.

tests/test_load.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/test_read_frames.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
import plume
3+
4+
5+
def test_load():
6+
reader = plume.RecordReader("tests/data/record.plm")
7+
8+
try:
9+
for frame in reader.frames:
10+
pass
11+
except Exception as e:
12+
pytest.fail("Failed to read frames: " + str(e))

tests/test_read_input_actions.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import pytest
2+
import plume
3+
4+
def test_read_input_actions():
5+
reader = plume.RecordReader("tests/data/record.plm")
6+
7+
try:
8+
for frame in reader.input_actions:
9+
pass
10+
except Exception as e:
11+
pytest.fail("Failed to read input actions: " + str(e))

0 commit comments

Comments
 (0)