-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support pathlib2 #408
Comments
Sure, that sounds helpful. I actually wasn't aware of |
There is another difficulty using e.g. def test_resolve(fs):
Path('foo').resolve(False) Causes: |
Yes, the version checking has been made for |
@mrbean-bremen sorry I don't have the time to prepare the PR. Feel free to use any of the code snippets if they are of any help. |
@mrbean-bremen I probably have time this weekend if you would like me to make a PR? |
@sk- no problem, thanks! |
Implemented in #422. |
First of all thanks for this project, it's really useful. However, it'd be great if there was support for
pathlib2
.In my code I'm importing it as
import pathlib2 as pathlib
. Which gets patched bypyfakefs
, however the patch uses the systempathlib
, which means that in my case it only works for Python 3.5 and 3.6, as I'm using theexist_ok
argument ofmkdir
. In Python 3.4 I get the following error:And in Python 2.7 the module is not patched at all.
I already managed to get this to work in Python 2.7 (and probably in 3.4),
In my test I had to add
and I had to change
fake_pathlib.py
as followingLet me know if you would be interested in accepting this change, so I could prepare a patch.
The text was updated successfully, but these errors were encountered: