Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 5, 2023
1 parent 743e53d commit a1c4b1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker
escapism
jupyterhub>=1.0
pytest-jupyterhub @ git+https://github.com/jupyterhub/pytest-jupyterhub.git@main
pytest-jupyterhub @ git+https://github.com/jupyterhub/pytest-jupyterhub.git@main
12 changes: 4 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jupyterhub
import netifaces
import pytest

# from pytest_jupyterhub.jupyterhub_spawners import hub_app
# from pytest_jupyterhub.jupyterhub_spawners import hub_app
from docker import from_env as docker_from_env
Expand All @@ -17,7 +18,6 @@

from dockerspawner import DockerSpawner, SwarmSpawner, SystemUserSpawner


# import base jupyterhub fixtures

# make Hub connectable from docker by default
Expand Down Expand Up @@ -74,20 +74,16 @@ def app(jupyterhub_app):
app.config.DockerSpawner.image = f"jupyterhub/singleuser:{tag}"
return app
"""


@pytest.fixture
async def app(hub_app):
config = {
"Dockerspawner": {
"prefix": "dockerspawner-test"
}
}
config = {"Dockerspawner": {"prefix": "dockerspawner-test"}}

if len(jh_version_info) > 3 and jh_version_info[3]:
tag = jupyterhub.__version__
config["Dockerspawner"]["image"] = f"jupyterhub/singleuser:{tag}"

app = await hub_app(config=config)

return app
Expand Down

0 comments on commit a1c4b1f

Please sign in to comment.