Skip to content
Merged
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
5 changes: 4 additions & 1 deletion tests/test_repository_readiness.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import math
from pathlib import Path

import pytest
import torch
from streamlit.testing.v1 import AppTest

from normalizer_module import MPO, MPS

APP_PATH = Path(__file__).resolve().parents[1] / "app.py"


def _assert_finite_unit_norm(layer: MPS | MPO) -> None:
norm = layer.compute_frob()
Expand All @@ -28,6 +31,6 @@ def test_mpo_initialization_produces_finite_unit_norm() -> None:


def test_streamlit_demo_loads_without_exceptions() -> None:
app = AppTest.from_file("app.py").run(timeout=30)
app = AppTest.from_file(str(APP_PATH)).run(timeout=30)

assert not app.exception