import pytest
{% set cls_name = items[0].cls_name %}
{% if cls_name %}
from {{ items[0].module }} import {{ cls_name }}

@pytest.fixture
def {{ cls_name.lower() }}():
    return {{ cls_name }}()
{% endif %}

{% for item in items %}
def test_{{ item.qual_name | replace('.', '_') }}_{{ item.examples.case_name }}(
    {{- cls_name.lower() if cls_name else '' -}}
):
    {% set inp = item.examples.input %}
    {% set exp = item.examples.expect %}
    result = {{ cls_name.lower() }}.{{ item.method_name }}(**{{ inp }})
    assert result == {{ exp }}
{% endfor %}