Spaces:
Runtime error
Runtime error
| 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" | |