Out there in the world packages and functions exist that checking the type of an object to find out if iti s a file-like object or a path/pathname.
When I do pathlib.Path('foobar').open() in a PyFakeFS environment the result is a FakeFileWrapper.
It behaves like a file-like object it didn't pass type tests like this.
isinstance(file_object, io.BaseIO)
Now the question is how to handle that?
Out there in the world packages and functions exist that checking the type of an object to find out if iti s a file-like object or a path/pathname.
When I do
pathlib.Path('foobar').open()in a PyFakeFS environment the result is aFakeFileWrapper.It behaves like a file-like object it didn't pass type tests like this.
isinstance(file_object, io.BaseIO)Now the question is how to handle that?