checkpoint before simplifying data
This commit is contained in:
@@ -13,15 +13,15 @@ from datetime import datetime
|
||||
# Add current directory to path to import our modules
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
# Mock response for testing
|
||||
MOCK_AI_RESPONSE = '''{
|
||||
"newprompt0": "Describe a place from your childhood that no longer exists. What made it special? What sounds, smells, and textures do you remember?",
|
||||
"newprompt1": "Write a letter to your future self 10 years from now. What hopes, fears, and questions do you want to share?",
|
||||
"newprompt2": "Imagine you wake up with a new superpower that only works on Tuesdays. What is it and how do you use it?",
|
||||
"newprompt3": "Describe a meal that represents your cultural heritage. Who taught you to make it? What memories are tied to it?",
|
||||
"newprompt4": "Write about a time you got lost, literally or metaphorically. What did you discover along the way?",
|
||||
"newprompt5": "Create a dialogue between your current self and your teenage self. What would you talk about?"
|
||||
}'''
|
||||
# Mock response for testing (new list format)
|
||||
MOCK_AI_RESPONSE = '''[
|
||||
"Describe a place from your childhood that no longer exists. What made it special? What sounds, smells, and textures do you remember?",
|
||||
"Write a letter to your future self 10 years from now. What hopes, fears, and questions do you want to share?",
|
||||
"Imagine you wake up with a new superpower that only works on Tuesdays. What is it and how do you use it?",
|
||||
"Describe a meal that represents your cultural heritage. Who taught you to make it? What memories are tied to it?",
|
||||
"Write about a time you got lost, literally or metaphorically. What did you discover along the way?",
|
||||
"Create a dialogue between your current self and your teenage self. What would you talk about?"
|
||||
]'''
|
||||
|
||||
|
||||
def test_file_structure():
|
||||
@@ -110,20 +110,20 @@ def test_mock_ai_response():
|
||||
# Test JSON parsing
|
||||
data = json.loads(MOCK_AI_RESPONSE)
|
||||
|
||||
# Check structure
|
||||
expected_keys = [f"newprompt{i}" for i in range(6)]
|
||||
missing_keys = [key for key in expected_keys if key not in data]
|
||||
# Check structure - should be a list
|
||||
if not isinstance(data, list):
|
||||
print(f" ✗ Mock response is not a list, got {type(data)}")
|
||||
return False
|
||||
|
||||
if missing_keys:
|
||||
print(f" ✗ Missing keys in mock response: {missing_keys}")
|
||||
if len(data) != 6:
|
||||
print(f" ✗ Mock response has {len(data)} items, expected 6")
|
||||
return False
|
||||
|
||||
print(f" ✓ Mock response parsed successfully")
|
||||
print(f" ✓ Contains all 6 expected prompts")
|
||||
|
||||
# Check prompt lengths
|
||||
for i in range(6):
|
||||
prompt = data[f"newprompt{i}"]
|
||||
for i, prompt in enumerate(data):
|
||||
if len(prompt) < 50:
|
||||
print(f" ⚠ Prompt {i} is very short ({len(prompt)} characters)")
|
||||
|
||||
@@ -281,3 +281,4 @@ if __name__ == "__main__":
|
||||
success = main()
|
||||
sys.exit(0 if success else 1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user