-
Notifications
You must be signed in to change notification settings - Fork 92
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
'WindowsPath' object has no attribute 'startswith' when setting cwd #1108
Comments
Thanks for the report! I can reproduce this with different Python versions, so this is not a Python 3.13-specific problem. It looks like a path object is passed somewhere where a string is expected. |
Sure! Not a problem. |
I just double-checked that this is related with the way I set |
I made a PR that should fix this, will probably merge tomorrow in case nobody objects. |
Awesome @mrbean-bremen! Many thanks for fixing this so quickly. Have a good one \m/ |
FYI: the patch release is out now. |
Thanks a lot! Having it working has been awesome for the project I'm working on. Cheers! |
I'm working on a project that uses pyfakefs to mock my filesystem to test folder creation and missing folders in a previously defined tree structure. I'm using Python 3.13 on Windows and get this output from the terminal after running my test:
Terminal output:
Test:
I found out after troubleshooting with another programmer that
cls.fake_fs().cwd
had to be cast as a string to be legally set like this:str(cls.fake_fs().cwd)
. That is not so bad on tests but it is in my source code, otherwise tests won't pass.I couldn't find anything that could give me a specific way to set
cwd
rather than just any string but I wonder if this is a platform or python version related issue. Maybe there's something different in Python 3.13 that causes this problem since a StackOverFlow community member confirmed me in this question he didn't get any trouble running the code on Linux and Python 3.11.Please let me know if you need more details from my side I'd be glad to contribute to your project by helping out troubleshooting.
The text was updated successfully, but these errors were encountered: