Skip to content

Commit b3035cd

Browse files
redsun82Copilot
andcommitted
Just: check the fixtures against the just the code will run
`forward_command` honours JUST_EXECUTABLE while these tests went to PATH, so pinning a `just` would have had the fixtures agree with one binary and the code run another. Resolving the module's own setting also makes the tests reachable under `bazel test`, whose sandbox offers a fixed PATH that no `just` is on, so they skipped there on every machine. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent fff48a4 commit b3035cd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎misc/just/test_forward_command.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ def test_two_roots_sharing_a_comment_still_both_run_if_they_do_different_work(se
308308
self.assertEqual([justfile for justfile, _ in found], [self.inner, self.outer])
309309

310310

311-
JUST = shutil.which("just")
311+
# Resolve the same binary `forward_command` will run: it honours JUST_EXECUTABLE, so a
312+
# pinned `just` would otherwise have these fixtures checked against a different binary
313+
# than the code uses. `which` covers both spellings, returning an explicit path as given
314+
# and looking a bare name up on PATH.
315+
JUST = shutil.which(forward_command.JUST)
312316

313317
# The justfile below uses every construct the fixtures above model, so that a dump of it
314318
# can be checked against them.

0 commit comments

Comments
 (0)