# ----------------------- Globals definition -----------------------------
-XDIST_WORKER = os.environ.get("PYTEST_XDIST_WORKER", "")
FILE_DIR = os.path.abspath(Path(__file__).parent)
ENV_RE = Re(b"([^=]+)=(.*)")
PRIORITY_TESTS = [
)
-def pytest_configure(config):
- # Ensure this hook only runs on the main pytest instance if xdist is
- # used to spawn other workers.
- if not XDIST_WORKER:
- if config.pluginmanager.has_plugin("xdist") and config.option.numprocesses:
- # system tests depend on module scope for setup & teardown
- # enforce use "loadscope" scheduler or disable paralelism
- try:
- import xdist.scheduler.loadscope # pylint: disable=unused-import
- except ImportError:
- isctest.log.debug(
- "xdist is too old and does not have "
- "scheduler.loadscope, disabling parallelism"
- )
- config.option.dist = "no"
- else:
- config.option.dist = "loadscope"
-
-
def pytest_ignore_collect(collection_path):
# System tests are executed in temporary directories inside
# bin/tests/system. These temporary directories contain all files
# information regarding copyright ownership.
[pytest]
-addopts = --tb=short -rA -vv
+addopts = --tb=short -rA -vv --dist=loadscope
log_format = %(asctime)s %(levelname)s:%(name)s %(message)s
log_date_format = %Y-%m-%d %H:%M:%S
log_cli = 1