-
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
Calling os.chdir twice #530
Comments
You create a file, not a directory (that would be |
Sorry, I copied the wrong error, I was trying things. I edited the post. |
Hm, I cannot reproduce this - probably will have another look tomorrow. |
That's weird - the test passes with unittest but fails with pytest! def test_twice_chdir(fs):
fs.create_dir("\\absolute\\path\\to\\directory")
os.chdir("\\absolute\\path\\to\\directory")
os.chdir("\\absolute\\path\\to\\directory") passes under Windows. So this probably comes up seldom enough... |
Thanks ! |
I'm not sure where to write that so I write this here for the moment. It seems to me that the time required to run the tests with pytest is quite the same if they use pyfakefs or not. Have you heard about that and would you have a solution ? Or should I take time to open a ticket with more data to support my says ? |
I haven't heard about this, and hadn't paid attention until now. I use test with coverage only occasionally, and take it as a given that they take longer. You can create an issue, of course, preferably with some example test (that can be cloned and used for testing) with and without using pyfakefs, and some timings. I doubt that we can do much (I currently have no idea how to appoach this), but we can have a look - maybe something shows up that can be improved. And thanks for the compliments :) |
Describe the bug
When calling twice os.chdir, I get NotADirectoryError on the second call.
Stack trace :
How To Reproduce
Your enviroment
The text was updated successfully, but these errors were encountered: