conftest.py 476 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import pytest

def pytest_addoption(parser):
    parser.addoption(
        "--binder-url",
        help="Fully qualified URL to the binder installation"
    )

    parser.addoption(
        "--hub-url",
        help="Fully qualified URL to the hub installation"
    )


@pytest.fixture
def binder_url(request):
    return request.config.getoption("--binder-url").rstrip("/")


@pytest.fixture
def hub_url(request):
    return request.config.getoption("--hub-url").rstrip("/")