Skip to content

Add direct unit tests for app/cli/local_llm/hardware.py #905

@VaibhavUpreti

Description

@VaibhavUpreti

Why This Matters

current local-LLM tests cover model recommendation heavily, but not the platform-specific hardware-detection helpers directly.

Read First

  • app/cli/local_llm/hardware.py

Scope

  1. Add direct tests for _get_total_ram_gb(), _get_available_ram_gb(), and detect_hardware().
  2. Cover both Linux and macOS branches by patching sys.platform.
  3. Test the conservative fallback behavior on command/file-read failure.

Tests / Coverage

  • tests/cli/test_local_llm_hardware.py
  • cover Linux /proc/meminfo parsing
  • cover macOS sysctl parsing
  • cover fallback RAM values
  • cover NVIDIA detection via shutil.which

Acceptance Criteria

  • hardware detection is directly covered
  • tests do not depend on the real host OS
  • fallback behavior is protected

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCommand-line interface worktestsTest coverage and test organization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions