Update cognee/tests/test_path_config.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
19e5980b50
commit
d385d7edba
1 changed files with 2 additions and 9 deletions
|
|
@ -45,19 +45,12 @@ def test_database_relative_paths():
|
|||
assert result == expected
|
||||
|
||||
# Test with relative base_path (should fail)
|
||||
try:
|
||||
with pytest.raises(ValueError, match="base_path must be absolute"):
|
||||
ensure_absolute_path(rel_path, base_path="relative/base", allow_relative=True)
|
||||
assert False, "Should fail when base_path is relative"
|
||||
except ValueError as e:
|
||||
assert "base_path must be absolute" in str(e)
|
||||
|
||||
# Test without base_path for relative path
|
||||
try:
|
||||
with pytest.raises(ValueError, match="base_path must be provided"):
|
||||
ensure_absolute_path(rel_path, allow_relative=True)
|
||||
assert False, "Should fail when base_path is not provided for relative path"
|
||||
except ValueError as e:
|
||||
assert "base_path must be provided" in str(e)
|
||||
|
||||
def test_path_consistency():
|
||||
"""Test that paths are handled consistently across configurations"""
|
||||
system_root = "C:/system/root" if os.name == 'nt' else "/system/root"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue