Skip to content

Commit e4c5b74

Browse files
Format
1 parent 85c9fab commit e4c5b74

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

tests/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ def event_loop():
3636
yield loop
3737
loop.close()
3838

39+
3940
@pytest.fixture(scope="session")
4041
def plugins():
4142
# By default, no plugins.
4243
# Other tests can override this fixture, such as in tests/openai_agents/conftest.py
4344
return []
4445

46+
4547
@pytest_asyncio.fixture(scope="session")
4648
async def env(request, plugins) -> AsyncGenerator[WorkflowEnvironment, None]:
4749
env_type = request.config.getoption("--workflow-environment")
@@ -53,12 +55,14 @@ async def env(request, plugins) -> AsyncGenerator[WorkflowEnvironment, None]:
5355
"--dynamic-config-value",
5456
"system.enableEagerWorkflowStart=true",
5557
],
56-
plugins=plugins
58+
plugins=plugins,
5759
)
5860
elif env_type == "time-skipping":
5961
env = await WorkflowEnvironment.start_time_skipping()
6062
else:
61-
env = WorkflowEnvironment.from_client(await Client.connect(env_type, plugins=plugins))
63+
env = WorkflowEnvironment.from_client(
64+
await Client.connect(env_type, plugins=plugins)
65+
)
6266
yield env
6367
await env.shutdown()
6468

tests/openai_agents/test_hello_world_workflow.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
from temporalio.worker import Worker
88

99
from openai_agents.basic.activities.get_weather_activity import get_weather
10-
from openai_agents.basic.activities.math_activities import multiply_by_two, random_number
10+
from openai_agents.basic.activities.math_activities import (
11+
multiply_by_two,
12+
random_number,
13+
)
1114
from openai_agents.basic.activities.image_activities import read_image_as_base64
1215

1316
from openai_agents.basic.workflows.hello_world_workflow import HelloWorldAgent
@@ -35,4 +38,3 @@ async def test_execute_workflow(client: Client):
3538
id=str(uuid.uuid4()),
3639
task_queue=task_queue_name,
3740
)
38-

0 commit comments

Comments
 (0)