You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a directory by UNC path (like //host/share/dir) at least two functions on this path (or FS object) fail:
os.stat
Path.is_dir
with Patcher() as patcher:
s = '//host/share/dir'
patcher.fs.create_dir(s)
Path(s).is_dir() # is False
os.stat(s) # raises exception
Failure
Traceback (most recent call last):
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 2000, in get_object_from_normpath
target_object = target_object.get_entry(component)
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 694, in get_entry
return self.contents[to_string(pathname_name)]
KeyError: 'host'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\projects\PS\PiA\productions\tests\tasks\test_get_prodlines_from_fs.py", line 53, in test
os.stat(s) # raises exception
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 4051, in stat
return self.filesystem.stat(path, follow_symlinks)
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 1187, in stat
self.get_object(parent_dir.path)
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 2025, in get_object
return self.get_object_from_normpath(file_path, check_read_perm)
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 2005, in get_object_from_normpath
self.raise_os_error(errno.ENOENT, file_path)
File "C:\projects\PS\virtualenvs\pia-TGUuFkkm-py3.8\lib\site-packages\pyfakefs\fake_filesystem.py", line 1010, in raise_os_error
raise OSError(errno, message, filename)
FileNotFoundError: [Errno 2] No such file or directory in the fake filesystem: '\\host\\share'
Env:
Windows-10-10.0.19041-SP0
Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)]
pyfakefs 4.4.0
The text was updated successfully, but these errors were encountered:
When creating a directory by UNC path (like //host/share/dir) at least two functions on this path (or FS object) fail:
Env:
Windows-10-10.0.19041-SP0
Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)]
pyfakefs 4.4.0
The text was updated successfully, but these errors were encountered: