-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_memos.py
More file actions
70 lines (53 loc) · 2.01 KB
/
test_memos.py
File metadata and controls
70 lines (53 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env python3
"""
Test script to verify MemoryOS installation and basic functionality
"""
import uuid
import sys
import os
def test_memos_basic():
"""Test basic MemoryOS functionality"""
try:
# Import MemoryOS components
print("Testing MemoryOS imports...")
# Try the import pattern from documentation
from memos.configs.mem_os import MOSConfig
from memos.mem_os.main import MOS
print("✅ MemoryOS imports successful!")
# Test basic initialization (without config file for now)
print("\nTesting basic MOS initialization...")
# Create a minimal config programmatically
# We'll need to check what the minimal config structure looks like
print("MemoryOS is ready for integration!")
return True
except ImportError as e:
print(f"❌ Import error: {e}")
return False
except Exception as e:
print(f"❌ Error: {e}")
return False
def test_memos_with_simple_config():
"""Test with a simple in-memory configuration"""
try:
from memos.configs.mem_os import MOSConfig
from memos.mem_os.main import MOS
print("\nTesting MemoryOS with simple configuration...")
# We'll need to create a simple config
# For now, let's see what happens without the config file
print("Config testing - need to understand MemoryOS config structure")
return True
except Exception as e:
print(f"❌ Config test error: {e}")
return False
if __name__ == "__main__":
print("🧠 MemoryOS Integration Test")
print("=" * 40)
# Test basic imports
if test_memos_basic():
print("\n✅ Basic MemoryOS test passed!")
# Test with config
test_memos_with_simple_config()
else:
print("\n❌ Basic MemoryOS test failed!")
sys.exit(1)
print("\n🎉 MemoryOS is ready for Echo Mind integration!")