Skip to content

Commit

Permalink
remove test for now
Browse files Browse the repository at this point in the history
  • Loading branch information
benpankow committed Jan 20, 2023
1 parent 3e23ce6 commit c2c6500
Showing 1 changed file with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pylint: disable=unused-argument

from dagster import Definitions, In, asset, job, op
from dagster._config.structured_config import Resource, StructuredConfigIOManager
from dagster._config.structured_config import StructuredConfigIOManager


def test_load_input_handle_output():
Expand Down Expand Up @@ -82,33 +82,3 @@ def hello_world_asset():
.success
)
assert out_txt == ["greeting: hello, world!"]


def test_nested_resources():
out_txt = []

class IOConfigResource(Resource):
prefix: str

class MyIOManager(StructuredConfigIOManager):
config: IOConfigResource

def handle_output(self, context, obj):
out_txt.append(f"{self.config.prefix}{obj}")

def load_input(self, context):
assert False, "should not be called"

@asset
def hello_world_asset():
return "hello, world!"

defs = Definitions(
assets=[hello_world_asset],
resources={
"io_manager": MyIOManager(config=IOConfigResource(prefix="greeting: ")),
},
)

assert defs.get_implicit_global_asset_job_def().execute_in_process().success
assert out_txt == ["greeting: hello, world!"]

0 comments on commit c2c6500

Please sign in to comment.