arrow_backRetour aux issues
Hebbian-Robotics/hflow
#108
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
Débutant
Ouvrirarrow_forward
tests: test_env_override_wins hardcodes Linux ffmpeg path on macOS
ecoDébutant
bug
good first issue
help wanted
descriptionDescription
## Summary
While validating PR #107 on macOS, I found that `test_env_override_wins` hardcodes `/usr/bin/ffmpeg`. The implementation correctly rejects nonexistent override paths, so the test fails on supported macOS installations where FFmpeg is normally elsewhere (for example, Homebrew uses `/opt/homebrew/bin/ffmpeg` on Apple Silicon).
## Environment
- HFlow upstream `main` (verified against the current raw source on 2026-08-22)
- macOS, Apple Silicon
- Python 3.14.2
- uv 0.12.5
- FFmpeg installed and available on `PATH`, but not at `/usr/bin/ffmpeg`
## Steps to reproduce
```bash
uv sync --locked --all-extras
uv run pytest -q tests/test_ffmpeg.py::test_env_override_wins
```
## Expected behavior
The platform-supported test should verify that an existing override path wins without depending on a Linux-specific filesystem location.
## Actual behavior
```text
E hflow.ffmpeg._binary.FfmpegNotFoundError:
E HFLOW_FFMPEG=/usr/bin/ffmpeg does not exist
1 failed
```
The failure is deterministic because `ffmpeg_path()` intentionally checks `Path(override).is_file()`.
## Possible cause
`tests/test_ffmpeg.py:67` sets:
```python
monkeypatch.setenv(FFMPEG_ENV_VAR, "/usr/bin/ffmpeg")
```
That path is not portable to macOS, despite CONTRIBUTING.md listing macOS as a supported native development platform.
## Proposed solution
Create a temporary file with `tmp_path`, set `HFLOW_FFMPEG` to that path, and assert the resolver returns it. The test only exercises path precedence, so it does not need a real executable:
```python
def test_env_override_wins(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
cleared_binary_caches: None,
) -> None:
override = tmp_path / "ffmpeg"
override.touch()
monkeypatch.setenv(FFMPEG_ENV_VAR, str(override))
assert ffmpeg_path() == override
```
This keeps the test hermetic and platform-independent.
Issues similaires
calkit/calkit
star53
Poids du dépôt moyen
VS Code extension should be robust to YAML parser errors
Seeing this error: ``` Failed to read calkit.yaml: YAMLParseError: A block sequence may not be used as an implicit map…
Python
bug
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: a manual Refresh control
The dashboard polls: `refreshStats()` (`src/doberman/dash/app.py:408`) every 5 s and `refreshPending()` (`:546`) every …
Python
enhancement
good first issue
fu351/Doberman-Core
star211
Poids du dépôt léger
dash: "Copy details" button on each pending-approval card
Each pending-approval card in the dashboard (`renderPending`, `src/doberman/dash/app.py:448-544`) shows the risk badge,…
Python
enhancement
good first issue