[issue26658] test_os fails when run on Windows ramdisk

Eryk Sun report at bugs.python.org
Thu Mar 31 01:47:20 EDT 2016


Eryk Sun added the comment:

I don't disagree with using os.path.lexists. However, I think it should also use a temporary target directory. Also, if it's possible to fix the behavior of os.stat when GetFinalPathNameByHandle fails (considering we already have a handle for the target), then that's icing on the cake. 

Another issue related to leaving garbage behind is when the DeviceIoControl call fails to store the reparse point. In this case, _winapi.CreateJunction fails to remove the directory that it creates for the junction. That should be fixed and tested. If CreateJunction fails with ERROR_INVALID_FUNCTION, test_create_junction should be modified to fail only if self.junction still exists. Otherwise the test should pass, i.e. it worked correctly by raising an exception and cleaning up after itself given a filesystem that doesn't support junctions.

----------
type:  -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26658>
_______________________________________


More information about the Python-bugs-list mailing list