File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 10
10
TEST_IMAGE_NAME = "test-systemd"
11
11
12
12
13
- @functools .lru_cache ()
13
+ @functools .lru_cache
14
14
def _get_container_runtime_cli ():
15
15
runtimes = ["docker" , "podman" ]
16
16
for runtime in runtimes :
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ def test_labextensions():
29
29
# jupyter-labextension writes to stdout and stderr weirdly
30
30
proc = subprocess .run (
31
31
["/opt/tljh/user/bin/jupyter-labextension" , "list" ],
32
- stderr = subprocess .PIPE ,
33
- stdout = subprocess .PIPE ,
32
+ capture_output = True ,
34
33
)
35
34
36
35
extensions = [
Original file line number Diff line number Diff line change @@ -143,18 +143,21 @@ def test_remove_from_config_error():
143
143
144
144
145
145
def test_reload_hub ():
146
- with mock .patch ("tljh.systemd.restart_service" ) as restart_service , mock .patch (
147
- "tljh.systemd.check_service_active"
148
- ) as check_active , mock .patch ("tljh.config.check_hub_ready" ) as check_ready :
146
+ with (
147
+ mock .patch ("tljh.systemd.restart_service" ) as restart_service ,
148
+ mock .patch ("tljh.systemd.check_service_active" ) as check_active ,
149
+ mock .patch ("tljh.config.check_hub_ready" ) as check_ready ,
150
+ ):
149
151
config .reload_component ("hub" )
150
152
restart_service .assert_called_with ("jupyterhub" )
151
153
check_active .assert_called_with ("jupyterhub" )
152
154
153
155
154
156
def test_reload_proxy (tljh_dir ):
155
- with mock .patch ("tljh.systemd.restart_service" ) as restart_service , mock .patch (
156
- "tljh.systemd.check_service_active"
157
- ) as check_active :
157
+ with (
158
+ mock .patch ("tljh.systemd.restart_service" ) as restart_service ,
159
+ mock .patch ("tljh.systemd.check_service_active" ) as check_active ,
160
+ ):
158
161
config .reload_component ("proxy" )
159
162
restart_service .assert_called_with ("traefik" )
160
163
check_active .assert_called_with ("traefik" )
You can’t perform that action at this time.
0 commit comments