Skip to content

Fix Claude CLI Execution on Windows for test_anthropic_api_key_handling #19

@yeabwang

Description

@yeabwang

Issue: Test test_anthropic_api_key_handling fails on Windows with "Claude CLI not installed" because subprocess.run(["claude", ...]) doesn’t handle claude.ps1.

Steps to Reproduce:

  1. Install Claude CLI (npm install -g @anthropic-ai/claude-code).

  2. Run pytest claudecode/test_integration.py::TestEnvironmentSetup::test_anthropic_api_key_handling.

  3. Error: Failed: Claude CLI not installed.

Root Cause: SimpleClaudeRunner uses subprocess.run without handling PowerShell scripts.

Environment: Windows 11, Claude CLI 1.0.71, Node.js 22.17.0, npm 10.9.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions