Fret Range & Cleanup
ci / checks (push) Failing after 3h14m51s

This commit is contained in:
khodowany
2026-09-19 22:29:54 -05:00
parent 85cab9d6f6
commit c07586e06a
274 changed files with 362 additions and 164309 deletions
+6 -5
View File
@@ -40,17 +40,18 @@ class PlaybackTests(unittest.TestCase):
unpitched = '<note><unpitched><display-step>C</display-step><display-octave>4</display-octave></unpitched><duration>4</duration><type>whole</type></note>'
with self.assertRaises(PlaybackUnavailable):
compile_timeline(parse(xml_score(unpitched)))
def test_guitar_octave_depends_on_category_not_lesson_name(self):
def test_guitar_octave_depends_on_score_metadata_not_path(self):
from generator.playback import compile_tree
from generator.score import write_json
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
source = parse(xml_score(xml_note()))
for relative in ('practice/melody/chord/score.json', 'practice/chord/lesson/score.json'):
write_json(root / relative, source)
for part in ('practice', 'acoustic', 'electric', 'vocal'):
source['staves'][0]['arrangement_part_type'] = part
write_json(root / f'{part}.json', source)
compile_tree(root)
for relative, pitch in [('practice/melody/chord/score.json', 60), ('practice/chord/lesson/score.json', 48)]:
playback = json.loads((root / relative).read_text())['playback']
for part, pitch in [('practice', 48), ('acoustic', 48), ('electric', 48), ('vocal', 60)]:
playback = json.loads((root / f'{part}.json').read_text())['playback']
self.assertEqual(playback['samples'][0]['id'], generate_tone(root, Fraction(pitch))['id'])
def test_audio_assets_validate_and_reject_corruption(self):
with tempfile.TemporaryDirectory() as directory: