@@ -164,12 +164,12 @@ def test_warmup_in_pipeline(self):
164164
165165
166166class TestRustProject :
167- def test_project_has_all_steps (self ):
167+ def test_project_has_all_methods (self ):
168168 proj = hm .rust .project (path = "cli" )
169169 assert proj .warmup .cmd is not None
170- assert proj .test .cmd is not None
171- assert proj .clippy .cmd is not None
172- assert proj .fmt .cmd is not None
170+ assert proj .test () .cmd is not None
171+ assert proj .clippy () .cmd is not None
172+ assert proj .fmt () .cmd is not None
173173
174174 def test_warmup_implicit_cache_on_change (self ):
175175 proj = hm .rust .project (path = "cli" )
@@ -186,39 +186,39 @@ def test_warmup_cache_override(self):
186186
187187 def test_test_command (self ):
188188 proj = hm .rust .project (path = "cli" )
189- assert "cargo test --workspace --locked" in proj .test .cmd
189+ assert "cargo test --workspace --locked" in proj .test () .cmd
190190
191191 def test_test_flags (self ):
192- proj = hm .rust .project (path = "." , test_flags = ( "--lib" , "--no-fail-fast" ) )
193- assert "cargo test --workspace --locked --lib --no-fail-fast" in proj .test .cmd
192+ proj = hm .rust .project (path = "." )
193+ assert "cargo test --workspace --locked --lib --no-fail-fast" in proj .test ( flags = ( "--lib" , "--no-fail-fast" )) .cmd
194194
195195 def test_clippy_command (self ):
196196 proj = hm .rust .project (path = "cli" )
197- assert "cargo clippy --workspace --tests --locked -- -D warnings" in proj .clippy .cmd
197+ assert "cargo clippy --workspace --tests --locked -- -D warnings" in proj .clippy () .cmd
198198
199199 def test_clippy_flags (self ):
200- proj = hm .rust .project (path = "." , clippy_flags = ( "--fix" ,) )
201- assert "cargo clippy --workspace --tests --locked --fix -- -D warnings" in proj .clippy .cmd
200+ proj = hm .rust .project (path = "." )
201+ assert "cargo clippy --workspace --tests --locked --fix -- -D warnings" in proj .clippy ( flags = ( "--fix" ,)) .cmd
202202
203203 def test_fmt_command (self ):
204204 proj = hm .rust .project (path = "cli" )
205- assert "cargo fmt --check" in proj .fmt .cmd
205+ assert "cargo fmt --check" in proj .fmt () .cmd
206206
207207 def test_fmt_flags (self ):
208- proj = hm .rust .project (path = "." , fmt_flags = ( "--all" ,) )
209- assert "cargo fmt --check --all" in proj .fmt .cmd
208+ proj = hm .rust .project (path = "." )
209+ assert "cargo fmt --check --all" in proj .fmt ( flags = ( "--all" ,)) .cmd
210210
211211 def test_test_chains_off_warmup (self ):
212212 proj = hm .rust .project (path = "." )
213- assert proj .test .parent is proj .warmup
213+ assert proj .test () .parent is proj .warmup
214214
215215 def test_clippy_chains_off_warmup (self ):
216216 proj = hm .rust .project (path = "." )
217- assert proj .clippy .parent is proj .warmup
217+ assert proj .clippy () .parent is proj .warmup
218218
219219 def test_fmt_chains_off_install (self ):
220220 proj = hm .rust .project (path = "." )
221- assert proj .fmt .parent is proj .toolchain .installed
221+ assert proj .fmt () .parent is proj .toolchain .installed
222222
223223 def test_toolchain_escape_hatch (self ):
224224 proj = hm .rust .project (path = "cli" )
@@ -228,21 +228,21 @@ def test_toolchain_escape_hatch(self):
228228 def test_with_base_skips_apt (self ):
229229 base = hm .scratch ().sh ("custom base" , label = "base" )
230230 proj = hm .rust .project (path = "cli" , base = base )
231- p = hm .pipeline (proj .test , proj .clippy , proj .fmt , default_image = "ubuntu:24.04" )
231+ p = hm .pipeline (proj .test () , proj .clippy () , proj .fmt () , default_image = "ubuntu:24.04" )
232232 cmds = _cmds (p )
233233 assert not any ("apt-get install" in c for c in cmds )
234234 assert any ("custom base" in c for c in cmds )
235235
236236 def test_labels (self ):
237237 proj = hm .rust .project (path = "." )
238238 assert proj .warmup .label == ":rust: warmup"
239- assert proj .test .label == ":rust: test"
240- assert proj .clippy .label == ":rust: clippy"
241- assert proj .fmt .label == ":rust: fmt"
239+ assert proj .test () .label == ":rust: test"
240+ assert proj .clippy () .label == ":rust: clippy"
241+ assert proj .fmt () .label == ":rust: fmt"
242242
243243 def test_pipeline_ir (self ):
244244 proj = hm .rust .project (path = "cli" )
245- p = hm .pipeline (proj .test , proj .clippy , proj .fmt , default_image = "ubuntu:24.04" )
245+ p = hm .pipeline (proj .test () , proj .clippy () , proj .fmt () , default_image = "ubuntu:24.04" )
246246 cmds = _cmds (p )
247247 assert any ("cargo build --workspace --tests --locked" in c for c in cmds )
248248 assert any ("cargo test --workspace --locked" in c for c in cmds )
@@ -253,6 +253,6 @@ def test_pipeline_ir(self):
253253
254254 def test_version_forwarded (self ):
255255 proj = hm .rust .project (path = "." , version = "1.81.0" )
256- p = hm .pipeline (proj .test )
256+ p = hm .pipeline (proj .test () )
257257 rustup = _step_by_substring (p , "sh.rustup.rs" )
258258 assert "--default-toolchain 1.81.0" in rustup ["cmd" ]
0 commit comments