Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions tests/test_update_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,19 @@ def update_shape():
MAKEFILE_SOURCE = f"templates/assembly-root/{MAKEFILE}"


def scaffold_upstream_and_project(tmp_path_factory, subdir: str):
def scaffold_upstream_and_project(tmp_path_factory, subdir: str,
*scaffold_args: str):
"""A fresh clone of this repository at A, and `PROJECT` scaffolded from
it into a recursive clone of its own — the part `upstream_and_project`
and `adopted_upstream_and_project` share verbatim. They differ only in
what commits they make on top afterward, which is why this stops here
and returns the pieces rather than a finished fixture dict: a shared
RETURN SHAPE across two fixtures is how the second one quietly drifts
from the first.

`scaffold_args` are extra flags for `scaffold-project.py` — a
`--tracking-branch`, for the project whose pull requests must not be
told to land on `main` (#209).
"""
base = tmp_path_factory.mktemp(subdir)
upstream = base / "openRepoShape"
Expand All @@ -98,7 +103,7 @@ def scaffold_upstream_and_project(tmp_path_factory, subdir: str):
upstream / "scaffold-project.py", "--org", ORG, "--project", PROJECT,
"--elected-by", "Test Human", "--elected-on", "2026-09-02",
"--local-remote-dir", str(base / "remotes"),
"--work-dir", str(base / "work"))
"--work-dir", str(base / "work"), *scaffold_args)
assert result.returncode == 0, result.stderr + result.stdout

clone = base / "clone" / PROJECT
Expand Down
Loading
Loading