← Back to issue list

Add negative assertions in pytest plugin

View original Github issue

Metadata

Project
craft-cli
Number
#489
Type
issue
State
closed
Author
bepri
Labels
Status: Triaged
Created
Updated
Closed

Current evaluation

Feature request to add negative assertions to the pytest plugin was closed without implementation. No PRs found adding `assert_not_*` methods.

Resolution: closed stale

Reason: The issue requested a feature that was not implemented. The issue was closed without any PR or commit adding the requested `assert_not_*` methods to the `RecordingEmitter`.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Each of the `RecordingEmitter` `.assert_*` methods should feature a means of negating the search, effectively `assert x not in messages` rather than `assert x in messages`. ### Why it needs to get done The alternative today is something ugly like: ```py assert not any(call.args[0] == "message" and call.args[1] == "hello" for call in emitter.interactions) ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b — closed stale Feature request to add negative assertions to the pytest plugin was closed without implementation. No PRs found adding `assert_not_*` methods.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 22
Complexity: 25
Confidence: 88
Actionability: 85
keep open Maintainer feature request to add negative assertion forms (assert_not_message, assert_not_warning, ...) to RecordingEmitter in craft_cli/pytest_plugin.py; triaged, agreed on by lengau, tracked as CRAFT-5335, not yet implemented.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 18
Complexity: 30
Confidence: 84
Actionability: 72
needs triage Feature request from a maintainer to add negated forms to RecordingEmitter's assert_* methods in the pytest plugin (e.g. "assert x not in messages"), replacing the ugly manual `any(...)` workaround. Unlabelled, no discussion yet.

Update history

Date Change
closed
updated
created

Related issues

Issue Project State Summary Similarity
#492 feat(pytest-plugin): negative assertion methods craft-cli merged Merged PR #492 adding negative assertion methods to the craft-cli pytest plugin, resolving feature request #489.
76%