Skip to content

Commit d3e18d9

Browse files
committed
Fix some style issues in tests
1 parent 14a29d1 commit d3e18d9

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

tests/base-notebook/test_healthcheck.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,32 +128,28 @@ def test_healthy_with_proxy(
128128

129129

130130
@pytest.mark.parametrize(
131-
"env,cmd,user",
131+
"env,cmd",
132132
[
133-
(["NB_USER=testuser", "CHOWN_HOME=1"], None, None),
133+
(["NB_USER=testuser", "CHOWN_HOME=1"], None),
134134
(
135135
["NB_USER=testuser", "CHOWN_HOME=1"],
136136
["start-notebook.py", "--ServerApp.base_url=/test"],
137-
None,
138137
),
139138
(
140139
["NB_USER=testuser", "CHOWN_HOME=1", "JUPYTER_PORT=8123"],
141140
["start-notebook.py", "--ServerApp.base_url=/test"],
142-
None,
143141
),
144142
],
145143
)
146144
def test_not_healthy(
147145
container: TrackedContainer,
148146
env: Optional[list[str]],
149147
cmd: Optional[list[str]],
150-
user: Optional[str],
151148
) -> None:
152149
running_container = container.run_detached(
153150
tty=True,
154151
environment=env,
155152
command=cmd,
156-
user=user,
157153
)
158154

159155
# sleeping some time to let the server start
@@ -164,6 +160,6 @@ def test_not_healthy(
164160
time.sleep(wait_time)
165161
time_spent += wait_time
166162
if get_health(running_container) == "healthy":
167-
raise RuntimeError("Container should not be healthy for these testcases.")
163+
raise RuntimeError("Container should not be healthy for this testcase")
168164

169165
assert get_health(running_container) != "healthy"

tests/minimal-notebook/test_nbconvert.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,8 @@
1111
THIS_DIR = Path(__file__).parent.resolve()
1212

1313

14-
@pytest.mark.parametrize(
15-
"test_file, output_format",
16-
[
17-
("notebook_math", "pdf"),
18-
("notebook_math", "html"),
19-
("notebook_svg", "pdf"),
20-
("notebook_svg", "html"),
21-
],
22-
)
14+
@pytest.mark.parametrize("test_file", ["notebook_math", "notebook_svg"])
15+
@pytest.mark.parametrize("output_format", ["pdf", "html"])
2316
def test_nbconvert(
2417
container: TrackedContainer, test_file: str, output_format: str
2518
) -> None:

tests/package_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _execute_command(self, command: list[str]) -> str:
9696
@staticmethod
9797
def _packages_from_json(env_export: str) -> dict[str, set[str]]:
9898
"""Extract packages and versions from the lines returned by the list of specifications"""
99-
# dependencies = filter(lambda x: isinstance(x, str), json.loads(env_export).get("dependencies"))
99+
# dependencies = filter(lambda x: isinstance(x, str), json.loads(env_export).get("dependencies"))
100100
dependencies = json.loads(env_export).get("dependencies")
101101
# Filtering packages installed through pip in this case it's a dict {'pip': ['toree==0.3.0']}
102102
# Since we only manage packages installed through mamba here

0 commit comments

Comments
 (0)