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

Unified Diff: recipe_modules/path/examples/full.py

Issue 2988583002: [path] Fix root path mocking. (Closed)
Patch Set: use real paths Created 3 years, 5 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 | « recipe_modules/path/api.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/path/examples/full.py
diff --git a/recipe_modules/path/examples/full.py b/recipe_modules/path/examples/full.py
index 255c3262fed01a0131c22f9716447047c1e3c317..0870a41a61476cea61f3ea712a372e55a6c10587 100644
--- a/recipe_modules/path/examples/full.py
+++ b/recipe_modules/path/examples/full.py
@@ -56,6 +56,11 @@ def RunSteps(api):
api.path.mock_add_paths(file_path)
assert api.path.exists(file_path)
+ # Assert that we can mock filesystem paths.
+ root_path = ('C:\\Windows' if api.platform.is_win else '/bin')
+ api.path.mock_add_paths(root_path)
+ assert api.path.exists(root_path)
+
realpath = api.path.realpath(file_path)
assert api.path.exists(realpath)
« no previous file with comments | « recipe_modules/path/api.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698