https://dagster.io/ logo
#ask-community
Title
# ask-community
b

Brendan Jackson

06/29/2023, 4:25 PM
What's the right way to test IO managers that handle time window partitions?
🤖 1
s

sean

06/29/2023, 4:51 PM
This is a bug we’re aware of-- until it gets fixed, I ’d recommend just executing the op in testing as part of a job. That will ensure the
step_context
is present. Something like this:
Copy code
@asset(partitions_def=..., io_manager_key="foo")
def my_asset(context):
    ...

defs = Definitions(
    assets=[my_asset],
    jobs=[define_asset_job("my_job")],
    resources={"foo": <io manager>},
)

defs.get_job_def("my_job").execute_in_process()
👍 1
Heads up I created an issue for this: https://github.com/dagster-io/dagster/issues/15051
b

Brendan Jackson

06/30/2023, 3:37 PM
Thanks! I'll follow it so I know when I can swap over