66from unittest import mock
77
88import vcf_rdfizer
9+ from test .helpers import VerboseTestCase
910
1011
1112def invoke_main (argv ):
@@ -22,8 +23,9 @@ def prepare_inputs(base: Path):
2223 return input_dir , rules_path
2324
2425
25- class WrapperUnitTests (unittest . TestCase ):
26+ class WrapperUnitTests (VerboseTestCase ):
2627 def test_main_happy_path_runs_pipeline_and_passes_compression (self ):
28+ """Wrapper runs all pipeline steps and forwards compression arguments."""
2729 with tempfile .TemporaryDirectory () as td :
2830 tmp_path = Path (td )
2931 input_dir , rules_path = prepare_inputs (tmp_path )
@@ -67,6 +69,7 @@ def fake_run(cmd, cwd=None, env=None):
6769 self .assertEqual (commands [2 ][- 2 :], ["-m" , "none" ])
6870
6971 def test_main_errors_when_versioned_image_does_not_exist (self ):
72+ """Wrapper returns a user error when a requested image version cannot be pulled."""
7073 with tempfile .TemporaryDirectory () as td :
7174 tmp_path = Path (td )
7275 input_dir , rules_path = prepare_inputs (tmp_path )
@@ -99,6 +102,7 @@ def test_main_errors_when_versioned_image_does_not_exist(self):
99102 self .assertEqual (rc , 2 )
100103
101104 def test_main_no_build_fails_if_local_image_missing (self ):
105+ """Wrapper fails fast with --no-build when no local image is available."""
102106 with tempfile .TemporaryDirectory () as td :
103107 tmp_path = Path (td )
104108 input_dir , rules_path = prepare_inputs (tmp_path )
@@ -126,6 +130,7 @@ def test_main_no_build_fails_if_local_image_missing(self):
126130 self .assertEqual (rc , 2 )
127131
128132 def test_resolve_image_ref_accepts_repo_plus_version (self ):
133+ """Image repository and explicit version resolve to a tagged image reference."""
129134 ref , requested = vcf_rdfizer .resolve_image_ref ("vcf-rdfizer" , "1.2.3" )
130135 self .assertEqual (ref , "vcf-rdfizer:1.2.3" )
131136 self .assertTrue (requested )
0 commit comments