Files
divkit/json-builder/python/tests/test_expr.py
T
p-mosein 2987d93ba7 pydivkit. migrate to uv+hatch, decompose entities.py, fix Python 3.14 compat
commit_hash:cf5070a543788fa57136adb1a4a7ea42f4490329
2026-02-10 16:34:59 +03:00

15 lines
359 B
Python

import pytest
from pydivkit.core import Expr
@pytest.mark.parametrize("input,res", (("@{string}", Expr("@{string}")),))
def test_expr(input, res):
assert str(Expr(input)) == str(res)
@pytest.mark.parametrize("input", ("@{before", "{before", "after}", "notcontains"))
def test_expr_fail(input):
with pytest.raises(ValueError):
Expr(input)