Skip to content

Commit 9f20194

Browse files
Fix linting error and add kernel test
1 parent 9970dd7 commit 9f20194

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/python/test_verify_local_setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,18 @@ def test_check_jupyter_kernel_found(monkeypatch: pytest.MonkeyPatch, suppress_pr
252252
assert not fix
253253

254254

255+
def test_check_jupyter_kernel_found_python3(monkeypatch: pytest.MonkeyPatch, suppress_print) -> None:
256+
"""Jupyter kernel check should pass when kernel is found."""
257+
with patch("subprocess.run") as mock_run:
258+
mock_run.return_value = Mock(
259+
stdout="Available kernels:\n python3\n",
260+
returncode=0,
261+
)
262+
ok, fix = vls.check_jupyter_kernel()
263+
assert ok is True
264+
assert not fix
265+
266+
255267
def test_check_jupyter_kernel_not_found(monkeypatch: pytest.MonkeyPatch, suppress_print) -> None:
256268
"""Jupyter kernel check should fail when kernel is not found."""
257269
with patch("subprocess.run") as mock_run:
@@ -651,7 +663,7 @@ def check_azure_providers_mock():
651663
# Should fail because azure_login failed (even though providers are skipped)
652664
assert result is False
653665
# Verify Azure Providers check was NOT called because login failed
654-
assert len(azure_providers_called) == 0
666+
assert not azure_providers_called
655667

656668

657669
def test_main_run_azure_providers_when_login_succeeds(monkeypatch: pytest.MonkeyPatch, suppress_print):

0 commit comments

Comments
 (0)