How to register matchers?
paxcodes opened this issue · 4 comments
paxcodes commented
I would like to register my own matcher.
I looked at pytest-recording
's source and noticed vcr is in _vcr.py ; Since it starts with an underscore, I'm guessing that it's not meant to be imported outside of the package?
How do I register my own matcher with pytest-recording?
Stranger6667 commented
Hi!
At the moment it is not possible - I'll work on this feature
Stranger6667 commented
I think we can declare a new pytest hook, so it will be backward-compatible. Something like this:
def pytest_recording_configure(config, vcr):
vcr.register_matcher(...)
Stranger6667 commented
This is released in 0.8.0. Let me know if it works for you :)
paxcodes commented
Thanks for the quick response there @Stranger6667! Yes, I was able to register my matcher. 👍🏼