diff --git a/pyproject.toml b/pyproject.toml index f63e51c..68cdff5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,9 @@ ignore = [ "TRY300", ] +[tool.pytest.ini_options] +pythonpath = ["."] + [tool.ruff.lint.per-file-ignores] "test/*" = ["INP001", "PLR2004", "SLF001"] diff --git a/test/manual_voicepeak_file_generation.py b/test/test_manual_voicepeak_file_generation.py similarity index 83% rename from test/manual_voicepeak_file_generation.py rename to test/test_manual_voicepeak_file_generation.py index 7642bd2..ff03f93 100644 --- a/test/manual_voicepeak_file_generation.py +++ b/test/test_manual_voicepeak_file_generation.py @@ -1,9 +1,20 @@ +# Copyright (c) 2023 Nanahuse +# This software is released under the MIT License +# https://opensource.org/license/mit/ + """VOICEPEAK integration tests that create output files. -These tests require a local VOICEPEAK installation. Pytest does not collect this -module by default; run it explicitly when file-generation coverage is needed: +These tests require a local VOICEPEAK installation and are marked xfail with +``run=False``, so they are reported as NOTRUN without launching VOICEPEAK. Run +them with pytest's built-in ``--runxfail`` option when file-generation coverage +is needed: + + uv run --group dev --with-editable . pytest --runxfail - uv run --extra dev --with-editable . pytest test/manual_voicepeak_file_generation.py +Or run just this module: + + uv run --group dev --with-editable . pytest \\ + test/test_manual_voicepeak_file_generation.py --runxfail """ import asyncio @@ -12,6 +23,8 @@ import pytest +pytestmark = pytest.mark.xfail(run=False, reason="requires a local VOICEPEAK installation; pass --runxfail to run") + TEST_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) OUTPUT_PATH = os.path.join(TEST_DIRECTORY, "output")