Repository navigation
refactor: reset jubilant before the bad-token tests - #209
Merged
Merged
Conversation
Follow-up to #208. Instead of giving the bad-token tests their own dir, have each remove jubilant from the module-wide test dir before running. The tests stay order-independent with the module's single fixture and one idiom (test_git_errors.py shares state across tests in the same dir), and no extra fixture is needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
What
Follow-up to #208. The bad-token tests assert that nothing is created on disk when the CLI rejects a token. #208 gave them a dedicated, function-scoped dir. This PR drops that fixture and instead has each test remove
jubilantfrom the module-widetest_dirbefore running, restoring the strict assertion.Why
test_dirfixture, matchingtest_git_errors.py, which also shares one dir across tests.Removing
jubilantis safe for the rest of the module: the remaining tests each clone their own branch fresh and don't read each other's clones.Validation
test_forked_repo_tokenruns first and createsjubilant).test_bad_token_no_ownerbeforetest_forked_repo_token): passes.