OLD | NEW |
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 Loading... |
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') |
OLD | NEW |