Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: testing_support/filesystem_mock.py

Issue 1085993004: Implement support for file: includes in OWNERS files. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: minor cleanups Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « owners.py ('k') | tests/owners_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ''
« no previous file with comments | « owners.py ('k') | tests/owners_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698