MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / flow_package

Function flow_package

lib/cli/tests/test_run_usage.py:494–504  ·  view source on GitHub ↗

A Python flow project's package name, unimported again after the test.

(project: Path, request: pytest.FixtureRequest)

Source from the content-addressed store, hash-verified

492
493@pytest.fixture
494def flow_package(project: Path, request: pytest.FixtureRequest) -> str:
495 """A Python flow project's package name, unimported again after the test."""
496 package = f"usage_flow_{uuid.uuid4().hex}"
497 write(
498 project / "pyproject.toml",
499 FLOW_PYPROJECT + f'\n[project.scripts]\nkickoff = "{package}.main:kickoff"\n',
500 )
501 write(project / "src" / package / "__init__.py", "")
502 request.addfinalizer(lambda: sys.modules.pop(f"{package}.main", None))
503 request.addfinalizer(lambda: sys.modules.pop(package, None))
504 return package
505
506
507@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

popMethod · 0.80
writeFunction · 0.70

Tested by

no test coverage detected