OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import contextlib |
| 6 |
| 7 from pylib.base import output_manager |
| 8 |
| 9 # TODO(jbudorick): This class is currently mostly unused. |
| 10 # Add a --bot-mode argument that all bots pass. If --bot-mode and |
| 11 # --local-output args are both not passed to test runner then use this |
| 12 # as the output manager impl. |
| 13 |
| 14 # pylint: disable=abstract-method |
| 15 # pylint: disable=no-self-use |
| 16 # pylint: disable=super-init-not-called |
| 17 # pylint: disable=unused-argument |
| 18 |
| 19 class NoopOutputManager(output_manager.OutputManager): |
| 20 |
| 21 def __init__(self): |
| 22 super(NoopOutputManager, self).__init__() |
| 23 |
| 24 #override |
| 25 @contextlib.contextmanager |
| 26 def ArchiveAndDeleteFile(self, *args, **kwargs): |
| 27 yield NoopArchivedFile() |
| 28 |
| 29 |
| 30 class NoopArchivedFile(output_manager.ArchivedFile): |
| 31 |
| 32 def __init__(self): |
| 33 pass |
| 34 |
| 35 def write(self, *args, **kwargs): |
| 36 pass |
| 37 |
| 38 def flush(self, *args, **kwargs): |
| 39 pass |
| 40 |
| 41 def Link(self): |
| 42 return '' |
| 43 |
OLD | NEW |