TouchGrass-3b / tests /test_config.py
Zandy-Wandy's picture
Upload 39 files
9071ef9 verified
"""
Test configuration for TouchGrass project.
"""
import os
import sys
from pathlib import Path
# Add project root to path
PROJECT_ROOT = Path(__file__).parent.parent
sys.path.insert(0, str(PROJECT_ROOT))
# Test data directory
TEST_DATA_DIR = PROJECT_ROOT / "tests" / "data"
TEST_DATA_DIR.mkdir(parents=True, exist_ok=True)
# Fixtures directory
FIXTURES_DIR = PROJECT_ROOT / "tests" / "fixtures"
FIXTURES_DIR.mkdir(parents=True, exist_ok=True)
# Test constants
MUSIC_TOKENS = [
"[GUITAR]", "[PIANO]", "[DRUMS]", "[VOCALS]", "[THEORY]", "[PRODUCTION]",
"[FRUSTRATED]", "[CONFUSED]", "[EXCITED]", "[CONFIDENT]",
"[EASY]", "[MEDIUM]", "[HARD]",
"[TAB]", "[CHORD]", "[SCALE]", "[INTERVAL]", "[PROGRESSION]",
"[SIMPLIFY]", "[ENCOURAGE]"
]
NOTATION_TOKENS = [
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B",
"m", "dim", "aug", "7", "maj7", "min7", "add9", "sus2", "sus4"
]
# Sample test data for music QA
SAMPLE_GUITAR_QA = {
"category": "guitar",
"messages": [
{"role": "system", "content": "You are a guitar assistant."},
{"role": "user", "content": "How do I play a G major chord?"},
{"role": "assistant", "content": "Place your middle finger on the 3rd fret of the 6th string, index on 2nd fret of 5th string, and ring/pinky on 3rd fret of 1st and 2nd strings."}
]
}
SAMPLE_THEORY_QA = {
"category": "theory",
"messages": [
{"role": "system", "content": "You are a music theory assistant."},
{"role": "user", "content": "What is a perfect fifth?"},
{"role": "assistant", "content": "A perfect fifth is an interval spanning 7 semitones. For example, C to G. It's a consonant interval often used in chord construction."}
]
}
SAMPLE_FRUSTRATION_QA = {
"category": "frustration",
"messages": [
{"role": "system", "content": "You are an encouraging music assistant."},
{"role": "user", "content": "I keep messing up this chord transition. It's so frustrating!"},
{"role": "assistant", "content": "Don't worry, chord transitions take time! Let's break it down: first practice switching just one finger at a time. You've got this!"}
]
}