Skip to content

FIX: Make ollama smoke test optional during pytest collection#166

Open
Aryama-srivastav wants to merge 1 commit intofireform-core:mainfrom
Aryama-srivastav:163
Open

FIX: Make ollama smoke test optional during pytest collection#166
Aryama-srivastav wants to merge 1 commit intofireform-core:mainfrom
Aryama-srivastav:163

Conversation

@Aryama-srivastav
Copy link

Description

This PR fixes test collection failures in clean environments where the optional ollama Python package is not installed.

Previously, src/test/test_model.py imported ollama at module import time, which caused pytest collection to fail with ModuleNotFoundError and prevented the rest of the suite from running. The test has been updated to use pytest-compatible optional dependency handling so environments without ollama skip this integration smoke test instead of failing collection.

Fixes #163

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

-Ran:
python -m pytest -q src/test/test_model.py

-Result:
1 skipped in 0.11s when ollama is not installed, confirming collection no longer errors and behavior is now optional.

Test Configuration:

  • Firmware version: N/A
  • Hardware: Windows local machine
  • SDK: N/A
  • Python: 3.13+

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

Test infrastructure is currently broken in a clean environment

1 participant