bacpilot-backend / tests /test_numeric_validator_wolfram_extraction.py
debpc
Wire Wolfram into numeric validation pipeline
512509e
Raw
History Blame Contribute Delete
600 Bytes
from types import SimpleNamespace
from app.services.numeric_validator import _extract_first_useful_wolfram_text
def test_extracts_rhs_from_wolfram_derivative_plaintext() -> None:
pods = [
SimpleNamespace(
title="Derivative",
plaintext="d/dx(x^2) = 2 x",
)
]
assert _extract_first_useful_wolfram_text(pods) == "2 x"
def test_extracts_plaintext_without_equals() -> None:
pods = [
SimpleNamespace(
title="Result",
plaintext="2 x",
)
]
assert _extract_first_useful_wolfram_text(pods) == "2 x"