mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
testutil/dott: add a note about endless output
Summary: The `output` API is the thing that stops infinite output from being used. If endless output is needed, it can be expressed using something like Python generator. Then the callsites using `stdin` needs update as well. Reviewed By: xavierd Differential Revision: D16464660 fbshipit-source-id: 1b81c44c5089f03687aa63ed3ffda9a5399c199b
This commit is contained in:
parent
2b63b9480e
commit
60cf7203a4
@ -29,7 +29,11 @@ class LazyCommand(object):
|
||||
|
||||
@property
|
||||
def output(self):
|
||||
"""Emulate the command. Return its output."""
|
||||
"""Emulate the command. Return its output.
|
||||
|
||||
Currently the output is a string. i.e. infinite stream (ex. `yes` from
|
||||
coreutils) cannot be expressed using this API.
|
||||
"""
|
||||
if self._output is None:
|
||||
if isinstance(self._command, str):
|
||||
args = shlex.split(self._command)
|
||||
|
Loading…
Reference in New Issue
Block a user