module documentation
(source)

Mock objects for file system classes

Since the file system is an external resource that assumes an underlying reality, it is a hard thing to mock in test cases. However it is also relatively slow, so having a good mock makes good test cases much more usable. Therefore we go to great lenght here to have a full set of mock classes for all file system related objects.

Class MockFile Undocumented
Class MockFolder Undocumented
Class MockFS Undocumented
Class MockFSNode Undocumented
Class MockFSObjectBase Undocumented
Function clone_mock_object No summary
Function os_native_path No summary
def clone_mock_object(source, target): (source)
Similar to copyto, but used to copy to a mock object that belongs to another mock filesystem hierarchy.
Parameters
sourcea MockFile or MockFolder
targetanother MockFile or MockFolder
def os_native_path(unixpath, drive='M:'): (source)
Adapts unix style paths for windows if needed For file paths starting with "/" and "file:///" URIs a drive letter is added and path seperators are converted if needed. Used for convenience to of writing cross-platform test cases Called automatically when constructing a MockFile or MockFolder object
Parameters
unixpaththe (mock) unix path as a string
driveUndocumented