Is it possible to rewrite these asserts? #12776
Unanswered
JasonGrace2282
asked this question in
Q&A
Replies: 1 comment
-
As far as I know, pytest's assertion rewriting is relatively complex in detail. I didn't quite understand what your specific need is, does it need to be compatible with the original assert statement? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does anybody know of a hook that is able to rewrite something like below?
(
pytest_assertrepr_compare
only works with stuff likeassert x == y
)Alternatively, is it possible to rewrite asserts like
to something like
With
pytest_assertrepr_compare
, you only get access to the value after it's evaluated, which is annoying.Beta Was this translation helpful? Give feedback.
All reactions