def test_rest_api_version_is_updated():
    """Checks that the version in JupyterHub's REST API definition file
    (rest-api.yml) is matching the JupyterHub version."""
    version_py = root.joinpath("jupyterhub", "_version.py")
    rest_api_yaml = root.joinpath("docs", "source", "_static", "rest-api.yml")
    ns = {}
    with version_py.open() as f:
        exec(f.read(), {}, ns)
    jupyterhub_version = ns["__version__"]

    with rest_api_yaml.open() as f:
        rest_api = yaml.load(f)
        rest_api_version = rest_api["info"]["version"]

    assert jupyterhub_version == rest_api_version
Checks that the version in JupyterHub's REST API definition file
(rest-api.yml) is matching the JupyterHub version.
docs/test_docs.py