Skip to content

Commit

Permalink
pre-commit: run hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Sep 20, 2024
1 parent e52495c commit 88a61c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/integration-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
TEST_IMAGE_NAME = "test-systemd"


@functools.lru_cache()
@functools.lru_cache
def _get_container_runtime_cli():
runtimes = ["docker", "podman"]
for runtime in runtimes:
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/test_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def test_labextensions():
# jupyter-labextension writes to stdout and stderr weirdly
proc = subprocess.run(
["/opt/tljh/user/bin/jupyter-labextension", "list"],
stderr=subprocess.PIPE,
stdout=subprocess.PIPE,
capture_output=True,
)

extensions = [
Expand Down
15 changes: 9 additions & 6 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,21 @@ def test_remove_from_config_error():


def test_reload_hub():
with mock.patch("tljh.systemd.restart_service") as restart_service, mock.patch(
"tljh.systemd.check_service_active"
) as check_active, mock.patch("tljh.config.check_hub_ready") as check_ready:
with (
mock.patch("tljh.systemd.restart_service") as restart_service,
mock.patch("tljh.systemd.check_service_active") as check_active,
mock.patch("tljh.config.check_hub_ready") as check_ready,
):
config.reload_component("hub")
restart_service.assert_called_with("jupyterhub")
check_active.assert_called_with("jupyterhub")


def test_reload_proxy(tljh_dir):
with mock.patch("tljh.systemd.restart_service") as restart_service, mock.patch(
"tljh.systemd.check_service_active"
) as check_active:
with (
mock.patch("tljh.systemd.restart_service") as restart_service,
mock.patch("tljh.systemd.check_service_active") as check_active,
):
config.reload_component("proxy")
restart_service.assert_called_with("traefik")
check_active.assert_called_with("traefik")
Expand Down

0 comments on commit 88a61c6

Please sign in to comment.