112 lines
3.4 KiB
Python
112 lines
3.4 KiB
Python
"""
|
|
Test script for the new Seasonal and Location modifier nodes
|
|
"""
|
|
|
|
from prompt_orchestrator import PromptOrchestrator
|
|
|
|
def test_seasonal_modifiers():
|
|
"""Test all 20 seasonal modifiers"""
|
|
orchestrator = PromptOrchestrator()
|
|
base_prompt = "Modern sports car parked on scenic overlook"
|
|
|
|
print("=" * 80)
|
|
print("TESTING SEASONAL MODIFIERS")
|
|
print("=" * 80)
|
|
print(f"Base prompt: {base_prompt}\n")
|
|
|
|
for mod_id in range(1, 21):
|
|
modifier = orchestrator.seasonal_modifiers[mod_id]
|
|
result = orchestrator.apply_seasonal_modifier(base_prompt, mod_id)
|
|
|
|
print(f"Modifier {mod_id} ({modifier.category.value}):")
|
|
print(f" Description: {modifier.description}")
|
|
print(f" Result: {result}")
|
|
print()
|
|
|
|
def test_location_modifiers():
|
|
"""Test all 20 location modifiers"""
|
|
orchestrator = PromptOrchestrator()
|
|
base_prompt = "Modern sports car showcased prominently"
|
|
|
|
print("=" * 80)
|
|
print("TESTING LOCATION MODIFIERS")
|
|
print("=" * 80)
|
|
print(f"Base prompt: {base_prompt}\n")
|
|
|
|
for mod_id in range(1, 21):
|
|
modifier = orchestrator.location_modifiers[mod_id]
|
|
result = orchestrator.apply_location_modifier(base_prompt, mod_id)
|
|
|
|
print(f"Modifier {mod_id}:")
|
|
print(f" Description: {modifier.description}")
|
|
print(f" Result: {result}")
|
|
print()
|
|
|
|
def test_category_distribution():
|
|
"""Test wet/dry distribution in seasonal modifiers"""
|
|
orchestrator = PromptOrchestrator()
|
|
|
|
print("=" * 80)
|
|
print("SEASONAL MODIFIER CATEGORY DISTRIBUTION")
|
|
print("=" * 80)
|
|
|
|
dry_count = 0
|
|
wet_count = 0
|
|
|
|
seasons = {
|
|
"Spring (1-5)": list(range(1, 6)),
|
|
"Summer (6-10)": list(range(6, 11)),
|
|
"Autumn (11-15)": list(range(11, 16)),
|
|
"Winter (16-20)": list(range(16, 21))
|
|
}
|
|
|
|
for season_name, mod_ids in seasons.items():
|
|
print(f"\n{season_name}:")
|
|
for mod_id in mod_ids:
|
|
modifier = orchestrator.seasonal_modifiers[mod_id]
|
|
category = modifier.category.value
|
|
print(f" {mod_id}: {category.upper()}")
|
|
|
|
if category == "dry":
|
|
dry_count += 1
|
|
else:
|
|
wet_count += 1
|
|
|
|
print(f"\nTotal DRY: {dry_count}")
|
|
print(f"Total WET: {wet_count}")
|
|
print()
|
|
|
|
def test_location_categories():
|
|
"""Test location category groupings"""
|
|
orchestrator = PromptOrchestrator()
|
|
|
|
print("=" * 80)
|
|
print("LOCATION MODIFIER CATEGORY GROUPINGS")
|
|
print("=" * 80)
|
|
|
|
categories = {
|
|
"Urban (1-6)": list(range(1, 7)),
|
|
"Rural/Country (7-11)": list(range(7, 12)),
|
|
"Interior (12-15)": list(range(12, 16)),
|
|
"Other Environments (16-20)": list(range(16, 21))
|
|
}
|
|
|
|
for category_name, mod_ids in categories.items():
|
|
print(f"\n{category_name}:")
|
|
for mod_id in mod_ids:
|
|
modifier = orchestrator.location_modifiers[mod_id]
|
|
print(f" {mod_id}: {modifier.description[:60]}...")
|
|
|
|
print()
|
|
|
|
if __name__ == "__main__":
|
|
# Run all tests
|
|
test_seasonal_modifiers()
|
|
test_location_modifiers()
|
|
test_category_distribution()
|
|
test_location_categories()
|
|
|
|
print("=" * 80)
|
|
print("ALL TESTS COMPLETED SUCCESSFULLY")
|
|
print("=" * 80)
|