Skip to content

Commit f1923a8

Browse files
committed
test: add pyproject.toml to openai-agents init test fixtures
uipath 2.10.x init now reads pyproject.toml for project metadata (name + description) when writing project.uiproj. The test's isolated_filesystem must include a minimal pyproject.toml or init exits with code 1.
1 parent ed2feaa commit f1923a8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

packages/uipath-openai-agents/tests/cli/test_init.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ def test_init_basic_config_generation(
3030
with open("openai_agents.json", "w") as f:
3131
f.write(openai_agents_config)
3232

33+
with open("pyproject.toml", "w") as f:
34+
f.write(
35+
'[project]\nname = "test-project"\nversion = "0.1.0"\n'
36+
'description = "Test project"\n'
37+
)
38+
3339
result = runner.invoke(cli, ["init"])
3440
assert result.exit_code == 0
3541
assert os.path.exists("entry-points.json")
@@ -87,6 +93,12 @@ def test_init_translation_agent_config_generation(
8793
with open("openai_agents.json", "w") as f:
8894
f.write(openai_agents_config)
8995

96+
with open("pyproject.toml", "w") as f:
97+
f.write(
98+
'[project]\nname = "test-project"\nversion = "0.1.0"\n'
99+
'description = "Test project"\n'
100+
)
101+
90102
result = runner.invoke(cli, ["init"])
91103
assert result.exit_code == 0
92104
assert os.path.exists("entry-points.json")

0 commit comments

Comments
 (0)