c3749daf48
Tests / test-linux (3.13) (push) Failing after 0s
Tests / test-linux (3.11) (push) Failing after 1s
Tests / lint (push) Failing after 0s
Tests / test-linux (3.9) (push) Failing after 1s
Docker / build (push) Failing after 1s
Docker / build-gpu (push) Failing after 2s
Tests / test-windows (push) Has been cancelled
Tests / test-macos (push) Has been cancelled
14 lines
415 B
Python
14 lines
415 B
Python
"""TDD: KnowledgeGraph.close() must hold self._lock."""
|
|
|
|
import inspect
|
|
from mempalace.knowledge_graph import KnowledgeGraph
|
|
|
|
|
|
class TestKGCloseLock:
|
|
def test_close_holds_lock(self):
|
|
src = inspect.getsource(KnowledgeGraph.close)
|
|
assert "self._lock" in src, (
|
|
"close() does not acquire self._lock. "
|
|
"Closing while a read/write is in progress can corrupt data."
|
|
)
|