def test_infer_output_description_from_docstring_rest(): @solid def rest(_context) -> int: """ :return int: a number """ defs = inference.infer_output_definitions("@solid", rest.name, rest.compute_fn) assert len(defs) == 1 assert defs[0].description == "a number" assert defs[0].dagster_type.unique_name == "Int"
def test_infer_output_description_from_docstring_google(): @solid def google(_context) -> int: """ Returns: int: a number """ defs = inference.infer_output_definitions("@solid", google.name, google.compute_fn) assert len(defs) == 1 assert defs[0].description == "a number" assert defs[0].dagster_type.name == "Int"
def test_infer_output_description_from_docstring_numpy(): @solid def numpy(_context) -> int: """ Returns ------- int a number """ defs = inference.infer_output_definitions("@solid", numpy.name, numpy.compute_fn) assert len(defs) == 1 assert defs[0].name == "result" assert defs[0].description == "a number" assert defs[0].dagster_type.unique_name == "Int"