feat(assertions): support custom assertions#891
Merged
Conversation
ffa82e6 to
c06ca20
Compare
Collaborator
|
CDS Report build-venom-a#327.0 ✘
|
Collaborator
|
CDS Report build-venom-a#327.1 ✘
|
e609422 to
a7fa030
Compare
Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com>
a7fa030 to
95b1e7c
Compare
yesnault
approved these changes
Jan 2, 2026
ivan-velasco
pushed a commit
to socotra/venom
that referenced
this pull request
Mar 25, 2026
* feat(assertions): support custom assertions Signed-off-by: GitHub <noreply@github.com> * custom to user assertion Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> --------- Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> Co-authored-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> Signed-off-by: Ivan Velasco <ivan.velasco@socotra.com>
storagebits
pushed a commit
to storagebits/venom
that referenced
this pull request
Apr 17, 2026
* feat(assertions): support custom assertions Signed-off-by: GitHub <noreply@github.com> * custom to user assertion Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> --------- Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> Co-authored-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com>
ivan-velasco
pushed a commit
to socotra/venom
that referenced
this pull request
Jun 6, 2026
* feat(assertions): support custom assertions Signed-off-by: GitHub <noreply@github.com> * custom to user assertion Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> --------- Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> Co-authored-by: Yvonnick Esnault <yvonnick.esnault@ovhcloud.com> Signed-off-by: Ivan Velasco <ivan.velasco@socotra.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a way to call user-defined executors directly in the
assertionsarray so it's possible for end-users to create custom assertions functions.If the custom executor name starts with
Should, it is also automatically registered in theassertMapallowing its use as a regular assertion keywordsExample:
The code reuses the same implementation as user defined executors which makes it a really low maintenance feature despite bringing a nice QOL change. The only difference is that the variables context is cleaned (as assertions executes independently from venom testcases) to ensure assertions are context independent and only depends on the given operands