mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-02-16 13:19:07 -06:00
* feat: implement lifespans * feat: add psycopg test dep * feat: lifespan script * feat: examples and tests * drive-by: add license * drive-by: throw errors for sanity checks * feat: docs * feat: sync and async * fix: docs * fix: lint * fix: small tweaks * fix: rm unused * fix: typed example * fix: print
13 lines
302 B
Python
13 lines
302 B
Python
import pytest
|
|
|
|
from examples.lifespans.simple import Lifespan, lifespan_task
|
|
|
|
|
|
@pytest.mark.asyncio(loop_scope="session")
|
|
async def test_lifespans() -> None:
|
|
result = await lifespan_task.aio_run()
|
|
|
|
assert isinstance(result, Lifespan)
|
|
assert result.pi == 3.14
|
|
assert result.foo == "bar"
|