import pytest
from pygears import gear, Intf, find
from pygears.typing import Unit
from pygears.hls import parse_gear_body
# from pygears.hls.utils import VisitError


# @pytest.mark.xfail(raises=VisitError)
# def test_generator_used_as_function():
#     def func(x):
#         yield True

#     @gear
#     def module(x):
#         a = func(x)
#         yield a

#     module(Intf(Unit))
#     parse_gear_body(find('/module'))

899e2f2fb325f8f5beafc540e7decc7166902000
<mask token>

import pytest
from pygears import gear, Intf, find
from pygears.typing import Unit
from pygears.hls import parse_gear_body

import pytest
from pygears import gear, Intf, find
from pygears.typing import Unit
from pygears.hls import parse_gear_body
# from pygears.hls.utils import VisitError


# @pytest.mark.xfail(raises=VisitError)
# def test_generator_used_as_function():
#     def func(x):
#         yield True

#     @gear
#     def module(x):
#         a = func(x)
#         yield a

#     module(Intf(Unit))
#     parse_gear_body(find('/module'))
