Skip to content

Isolate whoami unconfigured test from local dotfiles - #7

Merged
thibaudcolas merged 1 commit into
mainfrom
investigate-just-test-failure
Sep 21, 2026
Merged

thibaudcolas merged 1 commit into
mainfrom
investigate-just-test-failure

Conversation

@thibaudcolas

Copy link
Copy Markdown
Member

Summary

  • test_whoami_unconfigured_exit_2 failed on machines with a real ~/.wagtail-cli.toml: load_config picked up the local token, so the CLI appeared configured and hit the fake URL, exiting 3 (NetworkError) instead of the expected 2 (UsageError).
  • The test now monkeypatches wagtail_cli.config._user_dotfile and _project_dotfile to a tmp path, matching the isolation pattern already used by test_init_writes_dotfile.

Test instructions

just test and just lint pass locally (287 passed, 1 skipped).

@thibaudcolas
thibaudcolas merged commit 9aa3e69 into main Sep 21, 2026
11 of 12 checks passed
@thibaudcolas
thibaudcolas deleted the investigate-just-test-failure branch September 21, 2026 16:20
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