Testing¶
PyFuse includes a helper command pyfuse-test to run pytest with HTML report output by default.
Quick start¶
pyfuse-test
This runs pytest with verbose summary and creates a timestamped self-contained HTML report.
To print per-case output for passed integration comparisons too:
pyfuse-test --show-passed-details -m integration
Accepted environment variables for integration tests¶
The integration test runtime reads these environment variables:
INPUT_BKPT: path to input breakpoint fileTRUTH_OUTPUT: path to truth output fileINPUT_FORMAT: input format parser (for examplestar,default,arriba)REFERENCE_GENOME: FASTA path used for sequence-related annotation testsOUTPUT_PATH: base directory for test result output foldersCACHE_DIR: cache directory used by resource managerRESOURCE_PATH: explicit resource bundle directory for testsGENOME: default genome family (grch37orgrch38) whenRESOURCE_PATHis not setFUSION2VCF: toggles alternate truth parsing mode when set toTrueorTRUEperl: enables legacy normalization branch in truth parser logic
Examples¶
Run integration tests with defaults:
pyfuse-test -m integration
Run integration tests with custom input format and reference:
INPUT_FORMAT=star REFERENCE_GENOME=/data/ref/genome.fa pyfuse-test -m integration
Pin a specific resource bundle:
RESOURCE_PATH=/data/resources/custom_bundle pyfuse-test -m integration
Use a custom report name:
pyfuse-test --report pyfuse_pytest_report_custom.html
Pass any additional pytest options:
pyfuse-test -m integration -k annotation --maxfail=1
The --show-passed-details option sets PYFUSE_SHOW_MATCH_DETAILS=1 and uses --capture=tee-sys with INFO logging so pass comparison messages are visible in terminal output and preserved in pytest HTML output.
Troubleshooting¶
If pyfuse-test is not found, your current environment likely has an older install without the new entry point.
Reinstall in the active environment:
pip install -e .[dev]
Or use module invocation directly:
python -m pyfuse.test_cli -m integration