Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependencies = [
# From Template
"fastapi[all,standard]>=0.123.10",
"humanize>=4.14.0,<5",
"nicegui[native]>=3.5.0,<4", # CVE-2026-21871, CVE-2026-21871, CVE-2026-21873, CVE-2026-21874 all require >=3.5.0
"nicegui[native]>=3.10.0,<4", # CVE-2026-39844
"packaging>=25.0,<26",
"platformdirs>=4.5.1,<5",
"psutil>=7.1.3,<8",
Expand Down
8 changes: 2 additions & 6 deletions tests/aignostics/notebook/service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from unittest.mock import MagicMock, patch

import pytest
from fastapi.testclient import TestClient
from nicegui import app
from nicegui.testing import User

from aignostics.notebook._service import MARIMO_SERVER_STARTUP_TIMEOUT, Service, _get_runner, _Runner
Expand Down Expand Up @@ -99,7 +97,7 @@ def test_notebook_start_and_stop(caplog: pytest.LogCaptureFixture) -> None:
@pytest.mark.flaky(retries=1, delay=5, only_on=[AssertionError])
@pytest.mark.sequential
@pytest.mark.timeout(timeout=60 * 2)
def test_serve_notebook(user: User, caplog: pytest.LogCaptureFixture) -> None:
async def test_serve_notebook(user: User, caplog: pytest.LogCaptureFixture) -> None:
"""Test notebook serving.

Args:
Expand All @@ -112,10 +110,8 @@ def test_serve_notebook(user: User, caplog: pytest.LogCaptureFixture) -> None:
# Set up logging to capture DEBUG level and above
caplog.set_level(logging.DEBUG)

client = TestClient(app)

try:
response = client.get("/notebook/4711?results_folder=/tmp", timeout=60)
response = await user.http_client.get("/notebook/4711?results_folder=/tmp", follow_redirects=True)
Copy link

Copilot AI Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user.http_client.get(...) is now called without an explicit request timeout. httpx defaults (often ~5s) can make this integration test flaky because the notebook endpoint may block while the Marimo server starts. Pass an explicit timeout (e.g., matching the previous 60s) or configure the async client's timeout for this request.

Suggested change
response = await user.http_client.get("/notebook/4711?results_folder=/tmp", follow_redirects=True)
response = await user.http_client.get(
"/notebook/4711?results_folder=/tmp",
follow_redirects=True,
timeout=MARIMO_SERVER_STARTUP_TIMEOUT,
)

Copilot uses AI. Check for mistakes.
assert response.status_code == 200
content = response.content.decode("utf-8")
assert "iframe" in content
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading