avocado.core.utils package


avocado.core.utils.loader module

class avocado.core.utils.loader.TestError(*args, **kwargs)

Bases: avocado.core.test.Test

Generic test error.


Load test from the test factory.

Parameters:test_factory (tuple) – a pair of test class and parameters.
Returns:an instance of avocado.core.test.Test.

avocado.core.utils.path module


Returns either a system wide path, or one relative to the base.

If “etc/avocado/avocado.conf” is given as input, it checks for the existence of “/etc/avocado/avocado.conf”. If that path does not exist, then a path starting with the avocado’s Python’s distribution is returned. In that case it’d return something like “/usr/lib/python3.9/site-packages/avocado/etc/avocado/avocado.conf”.

Parameters:file_path (str) – a filesystem path that can either be absolute, or relative. If relative, the absolute equivalent (that is, by prefixing the filesystem root location) is checked for existence. If it does not exist, a path relative to the Python’s distribution base path is returned.
Return type:str

avocado.core.utils.version module


Module contents