File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ This repository contains a Python synthesizer and its accompanying tests.
1212- Build/Install: ` uv sync `
1313- Run app: ` uv run python main.py `
1414- Lint: ` uv run ruff check . `
15- - Run all tests: ` uv run pytest `
16- - Run single test: ` uv run pytest tests/test_file.py::TestClass::test_function -v `
17- - Test with coverage: ` uv run pytest --cov=qwerty_synth --cov-report=html `
15+ - Run all tests: ` PYNPUT_BACKEND=dummy QT_QPA_PLATFORM=offscreen uv run pytest`
16+ - Run single test: ` PYNPUT_BACKEND=dummy QT_QPA_PLATFORM=offscreen uv run pytest tests/test_file.py::TestClass::test_function -v`
17+ - Test with coverage: ` PYNPUT_BACKEND=dummy QT_QPA_PLATFORM=offscreen uv run pytest --cov=qwerty_synth --cov-report=html`
1818
1919## Code Practices
2020
@@ -51,7 +51,8 @@ This repository contains a Python synthesizer and its accompanying tests.
51511 . Install dependencies with ` uv sync ` .
52522 . Ensure the system package ` portaudio19-dev ` is installed.
53533 . Run the linter using ` uv run ruff check . ` and fix issues when possible.
54- 4 . Execute the tests: ` uv run pytest ` .
54+ 4 . Execute the tests with ` PYNPUT_BACKEND=dummy ` and ` QT_QPA_PLATFORM=offscreen ` :
55+ ` PYNPUT_BACKEND=dummy QT_QPA_PLATFORM=offscreen uv run pytest ` .
5556
5657## Project Structure
5758
Original file line number Diff line number Diff line change @@ -84,9 +84,11 @@ Note: MIDI controller input and MIDI file playback are separate features that ca
8484Run the test suite to verify everything is working correctly:
8585
8686``` bash
87- uv run pytest
87+ PYNPUT_BACKEND=dummy QT_QPA_PLATFORM=offscreen uv run pytest
8888```
8989
90+ The environment variables enable headless mode for running tests without a display or X11 server.
91+
9092## Usage tips
9193
9294* You can tweak the envelope (ADSR) in real time while playing notes.
You can’t perform that action at this time.
0 commit comments