Skip to content

Fix failing tests for guardrails checks#34

Merged
m-misiura merged 1 commit into
trustyai-explainability:developfrom
m-misiura:fix_guardrail_checks_tests
Mar 25, 2026
Merged

Fix failing tests for guardrails checks#34
m-misiura merged 1 commit into
trustyai-explainability:developfrom
m-misiura:fix_guardrail_checks_tests

Conversation

@m-misiura
Copy link
Copy Markdown
Collaborator

Fixing failing tests for guardrails check by adding configuration files and mocking LLM initialisation to avoid external provider dependencies

Output now yields:

 pytest tests/test_guardrail_checks_api.py
===================================================== test session starts ======================================================
platform darwin -- Python 3.13.5, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/mmisiura/repos/forked/NeMo-Guardrails
configfile: pytest.ini (WARNING: ignoring pytest config in pyproject.toml, tox.ini!)
plugins: httpx-0.36.0, langsmith-0.4.30, anyio-4.11.0, asyncio-1.3.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 20 items                                                                                                             

tests/test_guardrail_checks_api.py ....................                                                                  [100%]

====================================================== 20 passed in 3.82s ======================================================

@m-misiura m-misiura requested a review from RobGeada March 24, 2026 15:48
@m-misiura m-misiura force-pushed the fix_guardrail_checks_tests branch 2 times, most recently from b9e460e to 3d15506 Compare March 25, 2026 10:43
@m-misiura m-misiura force-pushed the fix_guardrail_checks_tests branch from e0a71bf to aec4d12 Compare March 25, 2026 11:00
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@954df0e). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #34   +/-   ##
==========================================
  Coverage           ?   76.92%           
==========================================
  Files              ?      200           
  Lines              ?    20387           
  Branches           ?        0           
==========================================
  Hits               ?    15683           
  Misses             ?     4704           
  Partials           ?        0           
Flag Coverage Δ
python 76.92% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
nemoguardrails/server/schemas/openai.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@m-misiura m-misiura merged commit 2b15b8e into trustyai-explainability:develop Mar 25, 2026
9 of 10 checks passed
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.

3 participants