Fix some style issues in tests

This commit is contained in:
Ayaz Salikhov
2024-01-16 16:35:14 +04:00
parent 14a29d12d8
commit d3e18d975c
3 changed files with 6 additions and 17 deletions

View File

@@ -128,18 +128,16 @@ def test_healthy_with_proxy(
@pytest.mark.parametrize(
"env,cmd,user",
"env,cmd",
[
(["NB_USER=testuser", "CHOWN_HOME=1"], None, None),
(["NB_USER=testuser", "CHOWN_HOME=1"], None),
(
["NB_USER=testuser", "CHOWN_HOME=1"],
["start-notebook.py", "--ServerApp.base_url=/test"],
None,
),
(
["NB_USER=testuser", "CHOWN_HOME=1", "JUPYTER_PORT=8123"],
["start-notebook.py", "--ServerApp.base_url=/test"],
None,
),
],
)
@@ -147,13 +145,11 @@ def test_not_healthy(
container: TrackedContainer,
env: Optional[list[str]],
cmd: Optional[list[str]],
user: Optional[str],
) -> None:
running_container = container.run_detached(
tty=True,
environment=env,
command=cmd,
user=user,
)
# sleeping some time to let the server start
@@ -164,6 +160,6 @@ def test_not_healthy(
time.sleep(wait_time)
time_spent += wait_time
if get_health(running_container) == "healthy":
raise RuntimeError("Container should not be healthy for these testcases.")
raise RuntimeError("Container should not be healthy for this testcase")
assert get_health(running_container) != "healthy"