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
Pyfakefs doesn't seem to support using relative paths with operations in the os
module, such as "mkdir", "remove" or "rename". The documentation for "mkdir"
even notes that relative paths are relative to root.
This makes it impossible to do something like
fake_os.mkdir("foo") # works
fake_os.rename("foo", "bar") # fails as os.rename doesn't recognize foo as
relative to root
Or:
fake_os.mkdir("foo")
fake_os.mkdir("foo/bar") # works
fake_os.chdir("foo") # works
fake_os.remove("bar") # remove looks for "bar" at the root
When testing code that interacts with the it's helpful to write tests that
exercise both relative and absolute paths.
Is there a reason this functionality is not implemented to match a real file
system?
Original issue reported on code.google.com by londinop on 6 May 2013 at 4:13
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
londinop
on 6 May 2013 at 4:13The text was updated successfully, but these errors were encountered: