◐ Shell
clean mode source ↗

feat: integrate pytest-gitlab by ptalbert · Pull Request #3313 · python-gitlab/python-gitlab

@@ -0,0 +1,26 @@ """ pytest-docker fixture overrides. See https://github.com/avast/pytest-docker#available-fixtures. """
import pytest

Check warning on line 6 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L6

Added line #L6 was not covered by tests



@pytest.fixture(scope="session") def docker_compose_project_name():

Check warning on line 10 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L9-L10

Added lines #L9 - L10 were not covered by tests

"""Set a consistent project name to enable optional reuse of containers.""" return "pytest-python-gitlab"

Check warning on line 12 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L12

Added line #L12 was not covered by tests



@pytest.fixture(scope="session") def docker_compose_file(docker_assets_dir): return docker_assets_dir / "docker-compose.yml"

Check warning on line 17 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L15-L17

Added lines #L15 - L17 were not covered by tests



@pytest.fixture(scope="session") def docker_cleanup(request):

Check warning on line 21 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L20-L21

Added lines #L20 - L21 were not covered by tests

"""Conditionally keep containers around by overriding the cleanup command.""" if request.config.getoption("--keep-containers"):

Check warning on line 23 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L23

Added line #L23 was not covered by tests

# Print version and exit. return "-v" return "down -v"

Check warning on line 26 in gitlab/testing/docker/docker.py

View check run for this annotation

Codecov / codecov/patch

gitlab/testing/docker/docker.py#L25-L26

Added lines #L25 - L26 were not covered by tests