This repository uses unittest (Python standard library) to isolate orchestration logic and shell script behavior without calling real external tools (Docker daemon, RMLStreamer, Brotli, HDT).
-
test/test_vcf_rdfizer_unit.py- Verifies wrapper control flow for the 5-step pipeline.
- Verifies image/version resolution behavior and error handling.
- Verifies CLI compression option propagation into
compression.sh.
-
test/test_vcf_rdfizer_cross_platform_unit.py- Runs a Windows/macOS/Linux-safe subset of wrapper tests.
- Focuses on CLI parsing, image resolution, compression method parsing, and mocked compress mode execution.
-
test/test_vcf_as_tsv_unit.py- Verifies
.vcfand.vcf.gzinput handling. - Verifies header extraction and per-VCF TSV generation (
<sample>.records.tsv,<sample>.header_lines.tsv,<sample>.file_metadata.tsv). - Verifies header normalization (
#CHROM->CHROM) and data row retention. - Verifies error path for empty input directories.
- Verifies
-
test/test_run_conversion_unit.py- Replaces
javawith a fake executable to avoid real RMLStreamer. - Verifies output normalization to
.nt. - Verifies unified metrics CSV row creation and schema consistency.
- Replaces
-
test/test_compression_unit.py- Replaces
gzip,brotli, andrdf2hdtwith fake executables. - Verifies compression artifact generation and metrics row update.
- Verifies
-m nonebehavior (no compression outputs, metrics still updated).
- Replaces
- Windows runners execute:
test/test_vcf_rdfizer_cross_platform_unit.py- package smoke test (
pip install+vcf-rdfizer --help)
- macOS/Linux runners execute the full suite, including shell-script unit tests.
- It tests the highest-risk logic in this codebase: orchestration, branching, path wiring, and metrics consistency.
- It catches regressions in command construction without requiring heavyweight dependencies.
- It validates that metrics remain comparable across runs by enforcing one shared CSV schema.
Run:
python -m unittest discover -s test -p "test_*_unit.py" -vSuccess indicators:
- Each test prints a clear marker:
[TEST] <description>[PASS] <description>
unittestprintsoknext to each test.- Final summary ends with:
Ran <N> tests ...OK
Example (truncated):
[TEST] Wrapper runs all pipeline steps and forwards compression arguments.
[PASS] Wrapper runs all pipeline steps and forwards compression arguments.
...
Ran 10 tests in 0.90s
OK