datalad-core/conftest.py
Michael Hanke 5a2f33ad05
feat: add loguru-based logging facility
A global ENV variable based switch is added
(DATALAD_CORE_LOGGER_ENABLE), which, when set, prevents the disabling
of the `datalad_core`-scoped logger. A fully disabled logger is
the default and expected behavior for a library.

In addition, a `datalad_core_logger` test fixture is provided that
enables a TRACE-level logger (-> stderr) for an individual test.
Arguable, debugging a single test like this is more common then
running all tests with full logging.

In contrast to legacy-datalad, there is no log *rendering* code to be
tested in the library.
2026-07-21 04:29:40 +02:00

50 lines
1.5 KiB
Python

"""Fixture setup"""
__all__ = [
'annexrepo',
'bareannexrepo',
'baregitrepo',
'cfgman',
'datalad_core_logger',
'datalad_testresources',
'gitrepo',
'http_fileserver',
'modified_dataset',
'progress_handler',
'skip_when_symlinks_not_supported',
'symlinks_supported',
'test_datasets',
'verify_pristine_gitconfig_global',
]
from datalad_core.tests.fixtures import (
# function-scope temporary Git repo with an initialized annex
annexrepo,
# function-scope temporary, bare Git repo with an initialized annex
bareannexrepo,
# function-scope temporary, bare Git repo
baregitrepo,
# function-scope config manager
cfgman,
# function-scope, temporarily enable library-scope logger
datalad_core_logger,
# session-scope, check for service availability
datalad_testresources,
# function-scope temporary Git repo
gitrepo,
# function-scope file server
http_fileserver,
# session-scope repository with complex unsafed modifications
modified_dataset,
# function-scope AuditProgressHandler
progress_handler,
# function-scope auto-skip when `symlinks_supported` is False
skip_when_symlinks_not_supported,
# session-scope flag if symlinks are supported in test directories
symlinks_supported,
# session-scope dataset collection, URL and path
test_datasets,
# verify no test leave contaminated config behind
verify_pristine_gitconfig_global,
)