avocado.core.utils package¶
Submodules¶
avocado.core.utils.loader module¶
-
class
avocado.core.utils.loader.
TestError
(*args, **kwargs)¶ Bases:
avocado.core.test.Test
Generic test error.
-
test
()¶
-
-
avocado.core.utils.loader.
load_test
(test_factory)¶ 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¶
-
avocado.core.utils.path.
prepend_base_path
(value)¶
-
avocado.core.utils.path.
system_wide_or_base_path
(file_path)¶ 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