source/projects/lilith/test/python/conftest.py

35 lines
580 B
Python
Raw Normal View History

"""
Pytest fixtures.
"""
2021-08-21 17:49:46 +00:00
2021-09-20 00:05:22 +00:00
from lilith.parser import (
GRAMMAR,
parser_with_transformer,
)
2021-08-21 17:49:46 +00:00
import pytest
@pytest.fixture
def args_grammar():
return parser_with_transformer(GRAMMAR, "args")
@pytest.fixture
def kwargs_grammar():
return parser_with_transformer(GRAMMAR, "kwargs")
@pytest.fixture
def arguments_grammar():
return parser_with_transformer(GRAMMAR, "arguments")
2021-08-21 22:58:59 +00:00
2021-08-21 23:14:57 +00:00
@pytest.fixture
def expr_grammar():
return parser_with_transformer(GRAMMAR, "expr")
2021-08-21 17:49:46 +00:00
@pytest.fixture
def header_grammar():
return parser_with_transformer(GRAMMAR, "header")