mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
2987d93ba7
commit_hash:cf5070a543788fa57136adb1a4a7ea42f4490329
15 lines
359 B
Python
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)
|