Skip to content

[Bug]: llama-dev test suite fails in local mode due to invalid mocked package paths #22695

Description

@CoralGarden52

Bug description

Running the llama-dev test suite locally fails in the local Rich progress-display path because the tests use mocked package paths outside repo_root.

Environment

  • Commit: afd0fef
  • Python: 3.13.12
  • pytest: 8.3.5
  • uv: 0.11.6
  • OS: Linux
  • llama-dev: 0.1

Steps to reproduce

From the repository root:

  1. Change into the llama-dev package:

    cd llama-dev
  2. Run the test suite without CI environment variables:

    env -u CI -u GITHUB_ACTIONS uv run pytest -q

Actual result

The test suite reports 5 failures and 64 passes. All failures raise:

ValueError: '/fake/repo/package1' is not in the subpath of
'/.../llama-dev/tests/data'

The failing tests are:

  • test_coverage_failures
  • test_install_failures
  • test_skip_failures_no_tests
  • test_skip_failures_unsupported_python
  • test_success

Expected result

The local test suite should complete successfully and report the expected mocked test results.

Relevant code

  • llama-dev/llama_dev/test/__init__.py:227
  • llama-dev/llama_dev/test/__init__.py:252
  • llama-dev/tests/test/test_test.py:146

The tests configure repo_root as the tests/data directory but return /fake/repo/package1 from mocked package discovery. The local Rich renderer calls Path.relative_to(repo_root) and raises before the mocked result can be displayed.

The issue is masked in CI because GitHub Actions sets CI=true and GITHUB_ACTIONS=true, which selects a different progress-reporting branch. For comparison:

CI=true uv run pytest tests/test/test_test.py -q

reports 20 passed.

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