mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
Merge 98ba90d459 into c60c714278
This commit is contained in:
commit
0c1684b735
2 changed files with 6 additions and 0 deletions
|
|
@ -204,6 +204,7 @@ class TestConflictingOwnersOfTheSettingsFile:
|
|||
|
||||
|
||||
class TestDoesNotDestroyUserOwnedStructure:
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="symlink creation needs elevation or Developer Mode on Windows")
|
||||
def test_writes_through_a_symlinked_settings_file(self, tmp_path):
|
||||
"""os.replace() swaps the symlink for a regular file, detaching a dotfiles repo.
|
||||
|
||||
|
|
@ -268,6 +269,7 @@ class TestConfigureStatePath:
|
|||
default_settings, default_state = default_paths
|
||||
assert configure_state_path(default_settings) == default_state
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="symlink creation needs elevation or Developer Mode on Windows")
|
||||
def test_a_symlink_alias_of_the_default_file_shares_its_receipt(self, default_paths):
|
||||
default_settings, default_state = default_paths
|
||||
default_settings.parent.mkdir(parents=True)
|
||||
|
|
@ -716,6 +718,7 @@ class TestConfigureAndUnconfigure:
|
|||
finally:
|
||||
rig.state.parent.chmod(0o700)
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="symlink creation needs elevation or Developer Mode on Windows")
|
||||
def test_configure_writes_through_a_symlinked_settings_file(self, tmp_path):
|
||||
target = tmp_path / "dotfiles" / "settings.json"
|
||||
target.parent.mkdir()
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ arbitrary local image paths working while refusing non-image files like
|
|||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ class TestResolveValidatedLocalImagePath:
|
|||
result = resolve_validated_local_image_path("/proc/self/environ")
|
||||
assert result is None
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="symlink creation needs elevation or Developer Mode on Windows")
|
||||
def test_rejects_symlink_pointing_to_non_image(self, tmp_path):
|
||||
secret = tmp_path / "secret.txt"
|
||||
secret.write_text("password=hunter2")
|
||||
|
|
@ -62,6 +64,7 @@ class TestResolveValidatedLocalImagePath:
|
|||
|
||||
assert result is None
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="symlink creation needs elevation or Developer Mode on Windows")
|
||||
def test_accepts_symlink_pointing_to_image(self, tmp_path):
|
||||
logo = tmp_path / "real_logo.png"
|
||||
logo.write_bytes(b"\x89PNG\r\n\x1a\nfake png body")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue