On Sun, May 12, 2019 at 07:44:01PM -0400, Shawn Brown wrote:
> So I have a few related questions I'm hoping someone can help me with:
> 
> Q: Is there a way to reference the current test from within
> pytest_assertrepr_compare()?
> 
> Q: If not, is there a decent way to implement something like this that
> isn't too hacky?

In your own code, you probably can't do so easily.

However, pytest itself does have access to the item when calling
pytest_assertrepr_compare - so you might want to consider submitting a
contribution to pytest to pass the item to the hook as well! :)

Florian

-- 
https://www.qutebrowser.org | m...@the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/

Attachment: signature.asc
Description: PGP signature

_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to