Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to utilise pytest unit test for metaflow #1810

Open
iamdansari opened this issue Apr 24, 2024 · 1 comment
Open

Unable to utilise pytest unit test for metaflow #1810

iamdansari opened this issue Apr 24, 2024 · 1 comment

Comments

@iamdansari
Copy link

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()

@savingoyal
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants