Home / Function/ test_mget_update_atime() — langchain Function Reference

test_mget_update_atime() — langchain Function Reference

Architecture documentation for the test_mget_update_atime() function in test_filesystem.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  0e1f4f79_af6a_a9b9_352a_2592206789c2["test_mget_update_atime()"]
  dc21888b_994e_4dfd_2387_4da22b01f8de["test_filesystem.py"]
  0e1f4f79_af6a_a9b9_352a_2592206789c2 -->|defined in| dc21888b_994e_4dfd_2387_4da22b01f8de
  style 0e1f4f79_af6a_a9b9_352a_2592206789c2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/storage/test_filesystem.py lines 62–82

def test_mget_update_atime() -> None:
    # Create a temporary directory for testing
    with tempfile.TemporaryDirectory() as temp_dir:
        # Instantiate the LocalFileStore with a directory inside the temporary directory
        # as the root path
        file_store = LocalFileStore(Path(temp_dir) / "store_dir", update_atime=True)

        # Set values for keys
        key_value_pairs = [("key1", b"value1"), ("key2", b"value2")]
        file_store.mset(key_value_pairs)

        # Get original access time
        file_path = file_store.root_path / "key1"
        atime1 = file_path.stat().st_atime

        # Get values for keys
        _ = file_store.mget(["key1", "key2"])

        # Make sure the filesystem access time has been updated
        atime2 = file_path.stat().st_atime
        assert atime2 != atime1

Domain

Subdomains

Frequently Asked Questions

What does test_mget_update_atime() do?
test_mget_update_atime() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/storage/test_filesystem.py.
Where is test_mget_update_atime() defined?
test_mget_update_atime() is defined in libs/langchain/tests/unit_tests/storage/test_filesystem.py at line 62.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free