2022-11-09 18:21:25 +01:00
|
|
|
"""conftest.py
|
|
|
|
|
|
|
|
Defines global pytest fixtures available to all tests.
|
|
|
|
"""
|
2023-04-10 12:38:21 +02:00
|
|
|
# pylint: disable=redefined-outer-name
|
2022-11-09 18:21:25 +01:00
|
|
|
from pathlib import Path
|
|
|
|
import os
|
2023-04-10 12:38:21 +02:00
|
|
|
import pytest
|
2022-11-09 18:21:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def base_path():
|
|
|
|
"""Returns the base path for the project"""
|
|
|
|
return Path(__file__).parent.parent
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def test_path(base_path):
|
|
|
|
"""Returns the path to the tests directory"""
|
|
|
|
return os.path.join(base_path, "tests")
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def podman_compose_path(base_path):
|
|
|
|
"""Returns the path to the podman compose script"""
|
|
|
|
return os.path.join(base_path, "podman_compose.py")
|