This module has two basic implementation of IJobResult: MemoryJobResult and DiskJobResult.
Bases: plainbox.impl.result._JobResultBase
A IJobResult that keeps IO logs on disk.
This type of JobResult is intended for working with most results. It does not store IO logs in memory so it is scalable to arbitrary IO log sizes. Each instance just knows where the log file is located (using the ‘io_log_filename’ attribute for that) and offers streaming API for accessing particular parts of the log.
Append new comments to the result
Parameters: | comments – The comments to append |
---|
This method simplifies appending comments to an existing result. Since initally there are no comments (None is returned) this makes all the code that has to halde updates a little tedious. Using this method, in contrast, is always easy.
comments of the test operator
The amount of time in seconds it took to run this job.
flag that indicates if the result is hollow
Hollow results may have been created but hold no data at all. Hollow results are also tentatively deprecated, once we have some time to re-factor SessionState and specifically the job_state_map code we will remove the need to have hollow results.
Hollow results are not saved, beginning with plainbox.impl.session.suspend.SessionSuspendHelper4.
Basic signal that supports arbitrary listeners.
While this class can be used directly it is best used with the helper decorator Signal.define on a function or method. See the documentation for the plainbox.vendor.morris module for details.
Attr _name: | Name of the signal, typically accessed via name(). |
---|---|
Attr _listeners: | |
List of signal listeners. Each item is a tuple (listener, pass_signal) that encodes how to call the listener. |
Basic signal that supports arbitrary listeners.
While this class can be used directly it is best used with the helper decorator Signal.define on a function or method. See the documentation for the plainbox.vendor.morris module for details.
Attr _name: | Name of the signal, typically accessed via name(). |
---|---|
Attr _listeners: | |
List of signal listeners. Each item is a tuple (listener, pass_signal) that encodes how to call the listener. |
outcome of running this job.
The outcome ultimately classifies jobs (tests) as failures or successes. There are several other types of outcome that all basically mean that the job did not run for some particular reason.
Get an ANSI escape sequence that represents this outcome
Get the hexadecimal “#RRGGBB” color that represents this outcome
Get the OutcomeMetadata object associated with this outcome.
return code of the command associated with the job, if any
Get the translated value of the outcome
Bases: gzip.GzipFile
Subclass of GzipFile that works around missing read1() on python3.2
See: http://bugs.python.org/issue10791
Disconnect this buffer from its underlying raw stream and return it.
After the raw stream has been detached, the buffer is in an unusable state.
Invoke the underlying file object’s fileno() method.
This will raise AttributeError if the underlying file object doesn’t support fileno().
Return whether this is an ‘interactive’ stream.
Return False if it can’t be determined.
Return a list of lines from the stream.
hint can be specified to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds hint.
Return the uncompressed stream file position indicator to the beginning of the file
Return current stream position.
Truncate file to size bytes.
File pointer is left unchanged. Size defaults to the current IO position as reported by tell(). Returns the new size.
Bases: builtins.tuple
IOLogRecord(delay, stream_name, data)
Alias for field number 2
Alias for field number 0
Raises ValueError if the value is not present.
Alias for field number 1
Bases: builtins.object
Class for streaming :class`IOLogRecord` instances from a text stream
Read the next record from the stream.
Returns: | None if the stream is empty |
---|---|
Returns: | next IOLogRecord as found in the stream. |
Bases: builtins.object
Class for writing IOLogRecord instances to a text stream
Write an IOLogRecord to the stream.
Bases: plainbox.impl.result._JobResultBase
A IJobResult that keeps IO logs in memory.
This type of JobResult is indented for writing unit tests where the hassle of going through the filesystem would make them needlessly complicated.
Append new comments to the result
Parameters: | comments – The comments to append |
---|
This method simplifies appending comments to an existing result. Since initally there are no comments (None is returned) this makes all the code that has to halde updates a little tedious. Using this method, in contrast, is always easy.
comments of the test operator
The amount of time in seconds it took to run this job.
flag that indicates if the result is hollow
Hollow results may have been created but hold no data at all. Hollow results are also tentatively deprecated, once we have some time to re-factor SessionState and specifically the job_state_map code we will remove the need to have hollow results.
Hollow results are not saved, beginning with plainbox.impl.session.suspend.SessionSuspendHelper4.
Basic signal that supports arbitrary listeners.
While this class can be used directly it is best used with the helper decorator Signal.define on a function or method. See the documentation for the plainbox.vendor.morris module for details.
Attr _name: | Name of the signal, typically accessed via name(). |
---|---|
Attr _listeners: | |
List of signal listeners. Each item is a tuple (listener, pass_signal) that encodes how to call the listener. |
Basic signal that supports arbitrary listeners.
While this class can be used directly it is best used with the helper decorator Signal.define on a function or method. See the documentation for the plainbox.vendor.morris module for details.
Attr _name: | Name of the signal, typically accessed via name(). |
---|---|
Attr _listeners: | |
List of signal listeners. Each item is a tuple (listener, pass_signal) that encodes how to call the listener. |
outcome of running this job.
The outcome ultimately classifies jobs (tests) as failures or successes. There are several other types of outcome that all basically mean that the job did not run for some particular reason.
Get an ANSI escape sequence that represents this outcome
Get the hexadecimal “#RRGGBB” color that represents this outcome
Get the OutcomeMetadata object associated with this outcome.
return code of the command associated with the job, if any
Get the translated value of the outcome
Bases: builtins.tuple
OutcomeMetadata(value, unicode_sigil, tr_outcome, tr_label, color_ansi, color_hex, hexr_xml_mapping, hexr_xml_allowed, hexr_xml_order)
Alias for field number 4
Alias for field number 5
Alias for field number 7
Alias for field number 6
Alias for field number 8
Raises ValueError if the value is not present.
Alias for field number 3
Alias for field number 2
Alias for field number 1
Alias for field number 0
Get an ANSI escape sequence that represents this outcome
Get the hexadecimal “#RRGGBB” color that represents this outcome