Comp
This commit is contained in:
@@ -194,8 +194,14 @@ class DraftCompositionTests(unittest.TestCase):
|
||||
self.assertNotEqual(second.state.development.id, second.state.home.id)
|
||||
self.assertEqual(second.state.selected_anchors, first.state.selected_anchors)
|
||||
def test_groups_cross_barlines_without_reference_timing_reset(self):
|
||||
groups = [t for p in self.solo.phrases for t in p.draft.transformations]
|
||||
self.assertTrue(any(t.start < beat < t.end for t in groups for beat in range(4, 32, 4)))
|
||||
# Exercise an explicitly spanning construction; do not require a changed
|
||||
# search objective to pick the same old winner merely to test timing.
|
||||
plan = self.solo.phrases[0].plan
|
||||
pattern = ((F(), F(1)), (F(1), F(3, 2)), (F(3, 2), F(2)), (F(2), F(3)))
|
||||
constructed = generator.solo.drafts.construct(plan, plan.motif, 'statement', ('spanning', pattern, F(3)), (), 0, self.solo.choices)
|
||||
self.assertIsNotNone(constructed)
|
||||
self.assertTrue(any(g.start < 4 < g.end for g in constructed.groups))
|
||||
self.assertTrue(any(s.start == F(4) and s.end == F(9, 2) for s in constructed.slots))
|
||||
for phrase in self.solo.phrases:
|
||||
by_id = {n.event_id: n for n in phrase.draft.notes}
|
||||
for transform in phrase.draft.transformations:
|
||||
|
||||
Reference in New Issue
Block a user