diff --git a/scripts/check.sh b/scripts/check.sh new file mode 100755 index 0000000..4ba2210 --- /dev/null +++ b/scripts/check.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +echo "Running tests..." +uv run pytest + +echo "Running lint..." +uv run pylint app tests diff --git a/tests/test_main.py b/tests/test_main.py index 3b78327..7b82c35 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -33,14 +33,14 @@ def test_audio_check(): @pytest.fixture -def audio(): +def audio_bytes(): with open(r"tests/test_audio.m4a", "rb") as audio: yield audio.read() -def test1(audiofile): +def test1(audio_bytes): with client.websocket_connect("/ws") as websocket: - websocket.send_bytes(audiofile) + websocket.send_bytes(audio_bytes) result = websocket.receive_json() assert "label" in result assert "score" in result