tobiko

class tobiko.CachedProperty(fget=None, fset=None, fdel=None, doc=None, cached_id=None)

Bases: object

class tobiko.CaptureLogFixture(test_case_id, logger=None, level=None, fmt=None)

Bases: SharedFixture

classmethod get(manager=None, fixture_id=None)
classmethod get_fixture_manager() FixtureManager
class tobiko.ExceptionInfo(type, value, traceback)

Bases: ExceptionInfo

class tobiko.FixtureManager

Bases: object

exception tobiko.InvalidVersion(message=None, **properties)

Bases: TobikoException

exception tobiko.MultipleObjectsFound(message=None, **properties)

Bases: TobikoException

exception tobiko.ObjectNotFound(message=None, **properties)

Bases: TobikoException

class tobiko.Operation

Bases: SharedFixture

classmethod get(manager=None, fixture_id=None)
classmethod get_fixture_manager() FixtureManager
class tobiko.RequiredFixture(cls: Type[G], setup=True, **kwargs)

Bases: property, Generic[G]

class tobiko.Retry(count: int | None = None, timeout: float | None = None, sleep_time: float | None = None, interval: float | None = None)

Bases: object

class tobiko.RetryAttempt(number: int, start_time: float, elapsed_time: float, count: int | None = None, timeout: float | None = None, sleep_time: float | None = None, interval: float | None = None)

Bases: object

exception tobiko.RetryCountLimitError(message=None, **properties)

Bases: RetryLimitError

exception tobiko.RetryLimitError(message=None, **properties)

Bases: RetryException

exception tobiko.RetryTimeLimitError(message=None, **properties)

Bases: RetryLimitError

class tobiko.RunsOperations

Bases: object

exception tobiko.SecondsValueError(message=None, **properties)

Bases: TobikoException

class tobiko.Selection(iterable=(), /)

Bases: list, Generic[T]

classmethod create(objects: Iterable[T] | None = None) Selection[T]
class tobiko.SharedFixture

Bases: Fixture

Base class for fixtures intended to be shared between multiple tests

Make sure that fixture setUp method can be called more than once, but actually executing _setUp method only the first time. This allows the fixture to be passed to useFixture methods multiple times without caring about if has already been used before.

Fixture set up can anyway be forced by calling ‘setup_shared_fixture’ method.

Because cleanup policy in a shared fixture is different from a common fixture, cleanUp method simply doesn’t nothing.

Actual fixture cleanup is executed by calling cleanup_shared_fixture method.

classmethod get(manager=None, fixture_id=None)
classmethod get_fixture_manager() FixtureManager
class tobiko.TableData(initial_data: Iterable[Dict[str, Any] | tuple] | None = None, columns: List[str] | None = None)

Bases: UserList

A list-like class for managing tabular data where each item is a dictionary and all dictionaries are guaranteed to have the same set of keys (schema).

This class enforces the schema upon initialization and when new items are added. It provides pandas-like functionality for data manipulation.

classmethod from_dict(data_dict: Dict[str, List[Any]])

Create a TableData object from a dictionary of lists (pandas-style).

Parameters:

data_dict – Dictionary where keys are column names and values are lists of values for that column.

Returns:

TableData object

classmethod read_csv(stream_or_string, header=None, skiprows=0, columns=None, sep=',', delim_whitespace=False)

Read CSV data into a TableData object.

Parameters:
  • stream_or_string – String, StringIO, or file-like object

  • header – Row number to use as column names, None means no header

  • skiprows – Number of rows to skip at the beginning

  • columns – List of column names to use

  • sep – Delimiter to use

  • delim_whitespace – Use whitespace as delimiter

Returns:

TableData object

class tobiko.TestCaseManager(start_time: float | None = None)

Bases: object

exception tobiko.TobikoException(message=None, **properties)

Bases: Exception

Base Tobiko Exception.

To use this class, inherit from it and define attribute ‘message’ string. If properties parameters is given, then it will format message string using properties as key-word arguments.

Example:

class MyException(TobikoException):
    message = "This exception occurred because of {reason}"

try:
    raise MyException(reason="something went wrong")
except MyException as ex:

    # It should print:
    #   This exception occurred because of something went wrong
    print(ex)

    # It should print:
    #   something went wrong
    print(ex.reason)
Attribute message:

the message to be printed out.

exception tobiko.VersionMismatch(message=None, **properties)

Bases: TobikoException

tobiko.tobiko_config()
tobiko.tobiko_config_dir()
tobiko.tobiko_config_path(path)