Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | |
| OLD | NEW |