Skip to content

Fix: completions test must not require the optional shtab extra - #9

Merged
ericwalisko merged 1 commit into
mainfrom
ericwalisko/fix-completions-test
Sep 4, 2026
Merged

Fix: completions test must not require the optional shtab extra#9
ericwalisko merged 1 commit into
mainfrom
ericwalisko/fix-completions-test

Conversation

@ericwalisko

Copy link
Copy Markdown
Owner

The v0.3.0 release build failed here:

tests/test_cli.py::test_completions_emits_a_shell_script
>   assert main(["completions", "zsh"]) == 0
E   AssertionError: assert 2 == 0
shell completions need shtab:  pip install 'memware[shell]'

The release job verifies against the bare wheel (no [shell] extra), so shtab is absent and memware completions correctly returns exit 2 with an install hint. The test wrongly required the optional dependency. Now it accepts either outcome: the completion script (exit 0) when shtab is installed, or the hint (exit 2) when it isn't. Matrix CI (which installs [dev], incl. shtab) still exercises the real script path.

No version change — after this merges I'll re-tag v0.3.0 (nothing was published; the build failed before the publish step).

🤖 Generated with Claude Code

The release job verifies the bare wheel (no [shell] extra), so shtab isn't
installed and `completions` returns exit 2 with an install hint. A test must not
require an optional dependency: accept the script (exit 0) when shtab is present
and the hint (exit 2) when it isn't.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NnaQwZUSDRbVUNh8fsdksD
@ericwalisko
ericwalisko merged commit 96d8181 into main Sep 4, 2026
6 checks passed
@ericwalisko
ericwalisko deleted the ericwalisko/fix-completions-test branch September 4, 2026 04:14
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