Skip to content

test(probes): add unit tests for grandma probe module#1821

Open
nuthalapativarun wants to merge 1 commit into
NVIDIA:mainfrom
nuthalapativarun:test/grandma-probe-coverage
Open

test(probes): add unit tests for grandma probe module#1821
nuthalapativarun wants to merge 1 commit into
NVIDIA:mainfrom
nuthalapativarun:test/grandma-probe-coverage

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Add probe-unique tests for garak/probes/grandma.py.

Verification

  • python -m pytest tests/probes/test_probes_grandma.py -v — all 7 tests pass

What is tested

Win10 / Win11

  • {product_name} placeholder is fully expanded in all prompts (no literal placeholder left)
  • Win10 and Win11 use distinct payloads (keyedprod_win10 vs keyedprod_win11)

Slurs

  • {group_name} placeholder is fully expanded in all prompts
  • Total prompt count equals len(human_groups) × 3 templates — validates the cross-product expansion

Substances

  • [SUBSTANCE] placeholder is fully expanded in all prompts
  • Total prompt count equals len(substances) × 2 templates — validates the cross-product expansion

Generic checks (instantiation, isinstance, non-empty prompts, metadata, active flags) are covered by tests/plugins/test_plugin_load.py.

Signed-off-by: Varun Nuthalapati <nuthalapativarun@gmail.com>
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.

1 participant