Skip to content

Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work.

test(security): skip symlink assertion when unsupported (#164)

Stamina967f488561261
diff --git a/tests/test_output_dir_security.py b/tests/test_output_dir_security.py
index 1dff059..a24563d 100644
--- a/tests/test_output_dir_security.py
+++ b/tests/test_output_dir_security.py
@@ -30,7 +30,10 @@ def test_prepare_output_dir_rejects_symlink(tmp_path):
real_dir = tmp_path / "real"
real_dir.mkdir()
link = tmp_path / "work"
- link.symlink_to(real_dir)
+ try:
+ link.symlink_to(real_dir, target_is_directory=True)
+ except (NotImplementedError, OSError) as exc:
+ pytest.skip(f"directory symlinks are unavailable on this host: {exc}")
with pytest.raises(ExtractionError, match="symbolic link"):
prepare_output_dir(link)