summaryrefslogtreecommitdiff
path: root/tests/conftest.py
blob: 9befeb7aaad5d5c2f14231d5173fc8757bb998a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import sys
from pathlib import Path

tests_dir = Path(__file__).parent.resolve()
sys.path.insert(0, str(tests_dir))

try:
    import xdist  # noqa: F401

    # Otherwise we get unknown hook 'pytest_xdist_auto_num_workers'
    def pytest_xdist_auto_num_workers(config):
        return os.getenv("FDO_CI_CONCURRENT", None)

except ImportError:
    pass