Skip to content

fix: keep bundle roundtrip test output in tmp_path - #35

Open
igor-ctrl wants to merge 1 commit into
mainfrom
fix/bundle-test-tmp-path
Open

fix: keep bundle roundtrip test output in tmp_path#35
igor-ctrl wants to merge 1 commit into
mainfrom
fix/bundle-test-tmp-path

Conversation

@igor-ctrl

Copy link
Copy Markdown
Owner

Summary

  • test_make_bundle_produces_valid_manifest (tests/test_bundle/test_bundle_roundtrip.py) was the one test in this file that called make_bundle() without an output_path. Every sibling test in the same file already passes output_path=tmp_path / "finance-X.tar.gz"; this one didn't.
  • make_bundle's default when output_path is omitted is Path.cwd() / f"{profile}-{version}.tar.gz" (src/bcli/bundle/_publish.py:68), so running pytest from a repo/worktree root wrote finance-2026.05.07-1.tar.gz straight into that root every time this test ran.
  • That artifact was found untracked in the main checkout and multiple worktrees, dated back to at least 2026-05 (a TRASH-FILES.md note from an earlier cleanup pass on 2026-07-22 already flagged it as a known "test-hygiene bug, follow-up" — this PR is that follow-up).

Changes

  • Add output_path=tmp_path / "finance-2026.05.07-1.tar.gz" to the make_bundle() call in test_make_bundle_produces_valid_manifest, matching the pattern every other test in the file already uses.

Test plan

  • uv run pytest tests/test_bundle/ -q — 14 passed
  • uv run pytest tests/ -q (full suite) — 1193 passed, 5 skipped, 0 failed
  • uv run ruff check src/ tests/ — clean
  • Confirmed no finance-2026.05.07-1.tar.gz (or any tarball) appears in the worktree root after running the test

test_make_bundle_produces_valid_manifest was the one test in this file
that didn't pass output_path to make_bundle(), so it fell through to
make_bundle's default (Path.cwd() / f"{profile}-{version}.tar.gz" in
src/bcli/bundle/_publish.py:68) and wrote finance-2026.05.07-1.tar.gz
into whatever directory pytest was invoked from. Every sibling test in
this file already scopes its output under tmp_path; this brings the
outlier in line with them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant