MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / test_exists

Method test_exists

tests/utils/test_other_utils.py:436–447  ·  view source on GitHub ↗

Test exists method.

(self, temp_dir, mock_lmdb)

Source from the content-addressed store, hash-verified

434 assert manager is not None
435
436 def test_exists(self, temp_dir, mock_lmdb):
437 """Test exists method."""
438 from datastudio.utils.database import ShardedLMDBManager
439
440 manager = ShardedLMDBManager(cache_dir=temp_dir, num_shards=4)
441
442 # Mock transaction
443 mock_txn = MagicMock()
444 mock_txn.get.return_value = None
445
446 result = manager.exists("test_path.jpg")
447 # Should check if key exists
448
449 def test_close_all(self, temp_dir, mock_lmdb):
450 """Test close_all method."""

Callers

nothing calls this directly

Calls 2

existsMethod · 0.95
ShardedLMDBManagerClass · 0.90

Tested by

no test coverage detected