Hello, got a quick question. Are there any testin...
# ask-community
j
Hello, got a quick question. Are there any testing examples (preferably with invocation) of
async
solids? currently working through this and there is a
DagsterTypeCheckDidNotPass
with type failure along the lines of
expected return_type got coroutine
. Our tests that use
execute_solid
for our async solids still work fwiw
basic example
Copy code
@solid
async def foo_async() -> str:
    return "bar"



@pytest.mark.asyncio
async def test_foo():
    result = await foo_async()
    assert result == "bar"
a
@chris
j
Forgot to mention yesterday, but the test passed without the type annotation. Once adding it, it throws the type error
c
taking a look
a
ah type annotation - that seems like what we need to repro the bug. Thanks for the report! edit: clarity
j
yep, sees type
coroutine
but expects
str
sorry if that wasnt clear
c
I don't think type annotation is the bug - I think we're getting the coroutine and not unfurling it properly