metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Unable to utilise pytest unit test for metaflow

Open iamdansari opened this issue 1 year ago • 1 comments

from HelloWorld import HelloWorld from metaflow import Flow, Metaflow import pytest

@pytest.fixture def get_flow(): # Setup flow = HelloWorld() // OSError: could not get source code

Below is a simple Metaflow

from metaflow import FlowSpec, step

class HelloWorldFlow(FlowSpec): @step def start(self): print("Hello, World!") self.next(self.end)

@step
def end(self):
    print("Flow completed.")

if name == 'main': HelloWorldFlow()

iamdansari avatar Apr 24 '24 17:04 iamdansari

@iamdansari we have a new API implementation landing soon that should help with this use case.

savingoyal avatar Apr 30 '24 17:04 savingoyal