tests(pyargus): add tests for parsing expressions

This commit is contained in:
Anand Balakrishnan 2023-10-11 18:05:54 -07:00
parent 019797f344
commit 5da441db42
9 changed files with 231 additions and 122 deletions

View file

@ -0,0 +1,16 @@
import logging
from hypothesis import given
import argus
from .utils.expr_gen import argus_expr
@given(spec=argus_expr())
def test_correct_expr(spec: str) -> None:
try:
_ = argus.parse_expr(spec)
except ValueError as e:
logging.critical(f"unable to parse expr: {spec}")
raise e