test_download_error_is_directory() — langchain Function Reference
Architecture documentation for the test_download_error_is_directory() function in sandboxes.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3c79baba_cbe6_e19b_1b8b_16254b3f4994["test_download_error_is_directory()"] 44713bb8_64c7_b8af_22f9_b6db34868592["SandboxIntegrationTests"] 3c79baba_cbe6_e19b_1b8b_16254b3f4994 -->|defined in| 44713bb8_64c7_b8af_22f9_b6db34868592 style 3c79baba_cbe6_e19b_1b8b_16254b3f4994 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/standard-tests/langchain_tests/integration_tests/sandboxes.py lines 297–312
def test_download_error_is_directory(
self, sandbox_backend: SandboxBackendProtocol
) -> None:
"""Downloading a directory should fail with a reasonable error code."""
if not self.has_sync:
pytest.skip("Sync tests not supported.")
dir_path = "/tmp/test_directory"
sandbox_backend.execute(f"rm -rf {dir_path} && mkdir -p {dir_path}")
responses = sandbox_backend.download_files([dir_path])
assert len(responses) == 1
assert responses[0].path == dir_path
assert responses[0].content is None
assert responses[0].error in {"is_directory", "file_not_found", "invalid_path"}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_download_error_is_directory() do?
test_download_error_is_directory() is a function in the langchain codebase, defined in libs/standard-tests/langchain_tests/integration_tests/sandboxes.py.
Where is test_download_error_is_directory() defined?
test_download_error_is_directory() is defined in libs/standard-tests/langchain_tests/integration_tests/sandboxes.py at line 297.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free