Fix Generation
ci / checks (push) Successful in 1h10m16s

This commit is contained in:
khodowany
2026-09-26 23:28:13 -05:00
parent 3beeb87549
commit a416a80dd9
6 changed files with 36 additions and 19 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ class GuitarPartTests(unittest.TestCase):
bass = [(n['onset'], p) for n in notes for p in n['pitches'] if p['tablature']['string'] >= 5 and 'tie_from' not in p]
upper = {generator.model.fraction(n['onset']) for n in notes for p in n['pitches'] if p['tablature']['string'] <= 4 and 'tie_from' not in p}
self.assertNotEqual({generator.model.fraction(onset) for onset, _ in bass}, upper)
self.assertEqual([generator.model.pitch_number(p) % 12 for _, p in bass], [0, 0])
self.assertEqual([generator.model.pitch_number(p) % 12 for _, p in bass], [7, 7])
self.assertEqual(bass[0][1]['tablature'], bass[1][1]['tablature'])
upper_shapes = {tuple((p['tablature']['string'], p['tablature']['fret']) for p in n['pitches'] if p['tablature']['string'] <= 4) for n in notes}
self.assertEqual(len(upper_shapes - {()}), 1)