You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no public test harness for consumers. Anyone testing a workflow must either:
Mock StorageDefault, ServerDefault, MetricsDefault, LogDefault by hand.
Or rely on the real defaults, which is fine in unit tests but
surfaces friction when one of them does I/O.
Concept
Expose a dotflow.testing module with ready-made fixtures. Consumers import them in their conftest.py with one line.
Proposed module
# dotflow/testing/__init__.pyimportpytestfromdotflowimportDotFlow, Configfromdotflow.providers.storage_defaultimportStorageDefault@pytest.fixturedefdotflow_storage():
"""Fresh in-memory storage for each test."""returnStorageDefault()
@pytest.fixturedefdotflow_config(dotflow_storage):
returnConfig(storage=dotflow_storage)
@pytest.fixturedefdotflow_workflow(dotflow_config):
"""A clean DotFlow with in-memory storage and no managed server."""returnDotFlow(config=dotflow_config)
Labels:
enhancement,good first issueContext
There is no public test harness for consumers. Anyone testing a workflow must either:
StorageDefault,ServerDefault,MetricsDefault,LogDefaultby hand.surfaces friction when one of them does I/O.
Concept
Expose a
dotflow.testingmodule with ready-made fixtures. Consumers import them in theirconftest.pywith one line.Proposed module
Usage in consumer code:
Acceptance criteria
dotflow.testingimportabledotflow_storage,dotflow_config,dotflow_workflowpytestruntime dependency on the main library install(move to
extras_require={'testing': ['pytest']})Future expansions
freeze_timestyle helper fortask.duration.StatusChangedevents from the busintroduced in this batch's issue 📘 DOCS-#6: Initial documentation #7.