Chromium Code Reviews| Index: scripts/slave/unittests/expect_tests/util.py |
| diff --git a/scripts/slave/unittests/expect_tests/util.py b/scripts/slave/unittests/expect_tests/util.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8426f4c7c021c5ecc6dcbb53ad3abaca8513e592 |
| --- /dev/null |
| +++ b/scripts/slave/unittests/expect_tests/util.py |
| @@ -0,0 +1,13 @@ |
| +# Copyright 2014 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +def covers(coverage_path_function): |
| + """Allows annotation of a Test generator function with a function that will |
| + return a list of coverage patterns which should be enabled during the use of |
| + the Test generator function. |
| + """ |
| + def _decorator(func): |
| + func._covers = coverage_path_function |
|
Vadim Sh.
2014/06/27 18:06:48
You do hasattr(..., '_covers') somewhere. Mention
iannucci
2014/06/28 08:58:18
Yep I did that
|
| + return func |
| + return _decorator |