Remove ini-file variable gitlab_url in favour of gitlab_domain and use a fixture to create the GitLab URL
Tobias @frust45 made the following suggestion:
It should be possible to implement somehting along these lines:
gitlab_domain = gitlab.hzdr.de use_ssl = True
And then do everything else in the python code. We could have a fixture, that returns the Gitlab URL.
@pytest.fixture def gitlab_url(): gitlab_domain: str = request_config.getini("gitlab_domain") use_ssl: bool = request_config.getini("use_ssl") return f"https://{ gitlab_domain }" if use_ssl else f"http://{ gitlab_domain }"
Might this be a solution?