tests(pyargus): add tests for parsing expressions
This commit is contained in:
parent
019797f344
commit
5da441db42
9 changed files with 231 additions and 122 deletions
16
pyargus/tests/test_expr.py
Normal file
16
pyargus/tests/test_expr.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue