Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/test_update_shape_pin_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,16 @@ def opening(spec, *_pin_path):
return real(str(upstream_and_project["upstream"]))

monkeypatch.setattr(update_shape, "open_upstream", opening)
# THIS PROCESS READS `LANES_LANE`, THE CHILD READS A BLANK (#1299).
# `update_shape.main` prints its NEXT through `lane_trailer_argument`,
# which reads this process's environment. This module's `run` goes
# through `conftest.run_script`, which blanks the child's lane. In a
# shell that exports one, only the in-process NEXT ended
# `--trailer 'Lane: <lane>'`, and the two answers differed by that
# alone. Unset is no lane, as the blank is: the two read the same. With
# the guard in place the child gets no lane even without that blank,
# because `run_script` copies `os.environ` after the guard has run.
monkeypatch.delenv("LANES_LANE", raising=False)
code = update_shape.main(["check", "--root", str(root)])
out = capsys.readouterr().out
passed = run(root, "check", *upstream_of(upstream_and_project))
Expand Down
Loading