scenario.knownissues module

Known issues.

exception KnownIssue(message, level=None, id=None, url=None)

Bases: TestError

Known issue object.

May be:

  • considered as an error,

  • considered as a warning,

  • ignored.

_url_builder

URL builder handler configured.

static seturlbuilder(url_builder)

Sets or unsets a URL builder handler.

Parameters:

url_builder

URL builder handler to set, or None to unset.

This handler shall return a URL string when it succeeded in building an URL for a given issue identifier, or None otherwise.

__init__(message, level=None, id=None, url=None)

Creates a known issue instance from the info given and the current execution stack.

Parameters:
  • message – Error or warning message to display with.

  • level – Issue level. Optional.

  • id – Issue identifier. Optional.

  • url – Issue URL. Optional.

level

Issue level.

id

Issue identifier.

_url

Issue URL set, or computed from id and _url_builder.

location

Redefinition of TestError.location in order to explicitize it cannot be None for KnownIssue instances.

__str__()

Short representation of the known issue.

‘Issue(({level-name}=){level})( {id})! {message}’.

property url

Issue URL getter.

Returns:

Issue URL if set, None otherwise.

static fromstr(string)

Builds a KnownIssue instance from its string representation.

Parameters:

string – String representation, as computed by __str__().

Returns:

New KnownIssue instance.

__eq__(other)

Known isue equality operator.

Parameters:

other – Candidate object.

Returns:

True when known issues hold the same information, False otherwise.

iserror()

Tells whether this error object is actually an error.

Returns:

True for a real error, False for a simple warning (see iswarning()) or when the error should be ignored (see isignored()).

iswarning()

Tells whether this error object is just a warning.

Returns:

True for a simple warning, False for a real error (see iserror()) or when the error should be ignored (see isignored()).

isignored()

Tells whether this error object should be ignored.

Returns:

True when the error should be ignored, False for a real error (see iserror()) or a warning (see iswarning()).

logerror(logger, level=30, indent='')

TestError.logerror() override in order to display the issue URL on a second line (if any).

tojson()

Converts the TestError instance into a JSON dictionary.

Returns:

JSON dictionary.

static fromjson(json_data)

Builds a KnownIssue instance from its JSON representation.

Parameters:

json_data – JSON dictionary.

Returns:

New KnownIssue instance.