We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbc9aaa commit 73e126cCopy full SHA for 73e126c
1 file changed
tests/unit/configs/test_loader.py
@@ -26,7 +26,8 @@ class TestConfig(BaseModel):
26
27
@fixture
28
def config_file():
29
- _, config_path = tempfile.mkstemp(suffix=".yaml")
+ fd, config_path = tempfile.mkstemp(suffix=".yaml")
30
+ os.close(fd)
31
32
config_content = {
33
"llm": {
@@ -59,7 +60,8 @@ def preset_files():
59
60
presets = [{"fix_tries": 3}, {"predictor_init_kwargs": {"with_tune": False}}]
61
preset_paths = []
62
for preset in presets:
- _, path = tempfile.mkstemp(suffix=".yaml")
63
+ fd, path = tempfile.mkstemp(suffix=".yaml")
64
+ os.close(fd) # Close the file descriptor to avoid PermissionError on Windows
65
preset_paths.append(path)
66
with open(path, "w") as f:
67
yaml.safe_dump(preset, f, indent=2)
0 commit comments