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

Side by Side Diff: scripts/slave/unittests/expect_tests/util.py

Issue 354913003: Add module discovery and autoloading to expect_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: add --force_coverage option Created 6 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 def covers(coverage_path_function): 5 def covers(coverage_path_function):
6 """Allows annotation of a Test generator function with a function that will 6 """Allows annotation of a Test generator function with a function that will
7 return a list of coverage patterns which should be enabled during the use of 7 return a list of coverage patterns which should be enabled during the use of
8 the Test generator function. 8 the Test generator function.
9 """ 9 """
10 def _decorator(func): 10 def _decorator(func):
11 func._covers = coverage_path_function 11 func._covers = coverage_path_function
12 return func 12 return func
13 return _decorator 13 return _decorator
14
15
16 def generator(function):
Vadim Sh. 2014/06/27 21:40:08 nit: test_generator generator is too generic, esp
iannucci 2014/06/28 16:22:17 Done.
17 """Marks function as an expect_tests Test generator"""
18 function._expect_tests_generator = True
19 return function
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698