Skip to content

Commit 5d74d2b

Browse files
authored
Merge pull request #8 from yprez/claude/run-pr-011CUzzZETZwEcjMG5pr6Y8Q
Document headless testing environment variables
2 parents ea4be07 + 725aeb9 commit 5d74d2b

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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.
5151
1. Install dependencies with `uv sync`.
5252
2. Ensure the system package `portaudio19-dev` is installed.
5353
3. 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

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ Note: MIDI controller input and MIDI file playback are separate features that ca
8484
Run 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.

0 commit comments

Comments
 (0)