libb.get_package_paths_in_module
- get_package_paths_in_module(*m)[source]
Get package paths within modules, useful for pytest conftest loading.
- Parameters:
m (
ModuleType) – One or more modules to inspect.- Returns:
Iterable of package path strings.
- Return type:
Iterable[str]
Conftest.py Example:
pytest_plugins = [*get_package_paths_in_module(tests.fixtures)] # Or multiple modules: pytest_plugins = [*get_package_paths_in_module(tests.fixtures, tests.plugins)]