fix: keep bundle roundtrip test output in tmp_path - #35
Open
igor-ctrl wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_make_bundle_produces_valid_manifest(tests/test_bundle/test_bundle_roundtrip.py) was the one test in this file that calledmake_bundle()without anoutput_path. Every sibling test in the same file already passesoutput_path=tmp_path / "finance-X.tar.gz"; this one didn't.make_bundle's default whenoutput_pathis omitted isPath.cwd() / f"{profile}-{version}.tar.gz"(src/bcli/bundle/_publish.py:68), so runningpytestfrom a repo/worktree root wrotefinance-2026.05.07-1.tar.gzstraight into that root every time this test ran.TRASH-FILES.mdnote 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
output_path=tmp_path / "finance-2026.05.07-1.tar.gz"to themake_bundle()call intest_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 passeduv run pytest tests/ -q(full suite) — 1193 passed, 5 skipped, 0 faileduv run ruff check src/ tests/— cleanfinance-2026.05.07-1.tar.gz(or any tarball) appears in the worktree root after running the test