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

Side by Side Diff: recipe_modules/shutil/example.py

Issue 2146523003: shutil recipe_module: port chromium_utils rmtree implementation. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: nit Created 4 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 unified diff | Download patch
« no previous file with comments | « recipe_modules/shutil/api.py ('k') | recipe_modules/shutil/example.expected/basic.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The LUCI Authors. All rights reserved. 1 # Copyright 2016 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 from recipe_engine.types import freeze 5 from recipe_engine.types import freeze
6 6
7 7
8 DEPS = [ 8 DEPS = [
9 'path', 9 'path',
10 'shutil', 10 'shutil',
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 assert actual_content == content 63 assert actual_content == content
64 64
65 # glob. 65 # glob.
66 files = api.shutil.glob( 66 files = api.shutil.glob(
67 'glob', tmp_dir.join('*'), 67 'glob', tmp_dir.join('*'),
68 test_data=[tmp_dir.join('dummy_file')]) 68 test_data=[tmp_dir.join('dummy_file')])
69 assert files == [str(tmp_dir.join('dummy_file'))], files 69 assert files == [str(tmp_dir.join('dummy_file'))], files
70 70
71 finally: 71 finally:
72 api.shutil.rmtree(tmp_dir, name='cleanup') 72 api.shutil.rmtree(tmp_dir, name='cleanup')
73 api.shutil.rmtree(new_tmp, name='cleanup2') 73 api.shutil.rmtree(new_tmp, name='cleanup2', flag_smart_rmtree=True)
74 74
75 75
76 def GenTests(api): 76 def GenTests(api):
77 yield api.test('basic') 77 yield api.test('basic')
OLDNEW
« no previous file with comments | « recipe_modules/shutil/api.py ('k') | recipe_modules/shutil/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698