Skip to content

Commit dbaecae

Browse files
committed
fix: generate pyproject for init tests
1 parent f852927 commit dbaecae

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

packages/uipath-llamaindex/tests/cli/test_init.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77

88
class TestInit:
9+
def _generate_pyproject(self):
10+
with open("pyproject.toml", "w") as f:
11+
f.write(
12+
'[project]\nname = "test-project"\nversion = "0.1.0"\n'
13+
'description = "Test"\nauthors = [{name = "Test"}]\n'
14+
'requires-python = ">=3.11"\n'
15+
)
16+
917
def test_init_basic_config_generation(
1018
self,
1119
runner: CliRunner,
@@ -22,6 +30,8 @@ def test_init_basic_config_generation(
2230
with open("llama_index.json", "w") as f:
2331
f.write(llama_config)
2432

33+
self._generate_pyproject()
34+
2535
result = runner.invoke(init)
2636
assert result.exit_code == 0
2737
assert os.path.exists("entry-points.json")
@@ -74,6 +84,7 @@ def test_init_custom_config_generation(
7484

7585
with open("llama_index.json", "w") as f:
7686
f.write(llama_config)
87+
self._generate_pyproject()
7788

7889
result = runner.invoke(init)
7990
assert result.exit_code == 0

0 commit comments

Comments
 (0)