vcrpy
vcrpy copied to clipboard
VCR does not accept `pathlib.Path` as cassette path
>>>from pathlib import Path
>>>@vcr.use_cassette(Path('./my_path.yml'))
>>>def test():
>>> pass
TypeError: module, class, method, function, traceback, frame, or code object was expected, got WindowsPath
Using Path
is a common way of storing platoform-independent pahts. It should be easy to adapt vcrpy
to using them: could just convert to str
if Path
.
I would actually be fine with this behavior if vcrpy errored out as well - as it stands now, it just inexplicably doesn't write the cassette.
since i wanted this functionality too i wrote this Pull requests https://github.com/kevin1024/vcrpy/pull/658 that fixes this
This PR has been merged! Thanks for your contribution