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

Side by Side Diff: recipe_modules/file/examples/error.py

Issue 2918463002: [recipe_modules/file] add real file module to engine. (Closed)
Patch Set: fix stuff Created 3 years, 6 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
OLDNEW
(Empty)
1 # Copyright 2017 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file.
4
5 DEPS = [
6 "file",
7 "path",
8 ]
9
10
11 def RunSteps(api):
12 try:
13 api.file.read_text(
14 'does not exist', api.path['start_dir'].join('not_there'))
15 assert False, "never reached" # pragma: no cover
16 except api.file.Error as e:
17 assert e.errno_name == 'ENOENT'
18
19
20 def GenTests(api):
21 yield (
22 api.test('basic')
23 + api.step_data('does not exist', api.file.errno('ENOENT'))
24 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698