Index: testing_support/filesystem_mock.py |
diff --git a/testing_support/filesystem_mock.py b/testing_support/filesystem_mock.py |
index 07e1834ffe14aecbfab2441c20db51eb4077e47b..b45ea8e37409a766009e1afbb4e10b0dad357a3b 100644 |
--- a/testing_support/filesystem_mock.py |
+++ b/testing_support/filesystem_mock.py |
@@ -38,6 +38,11 @@ class MockFileSystem(object): |
return path[:-1] |
return path |
+ def basename(self, path): |
+ if self.sep not in path: |
+ return '' |
+ return self._split(path)[-1] or self.sep |
+ |
def dirname(self, path): |
if self.sep not in path: |
return '' |