+3
-1
@@ -19,6 +19,7 @@ import generator.playback
|
||||
import tests.arrangement_fixtures
|
||||
import tests.rhythm_fixtures
|
||||
import tests.scale_fixtures
|
||||
import tests.solo_fixtures
|
||||
import tests.test_musicxml
|
||||
|
||||
def xml_harmony(root='C', kind='major', offset=0):
|
||||
@@ -166,11 +167,12 @@ class PartGenerationTests(unittest.TestCase):
|
||||
for name in names:
|
||||
(source / (name + '.xml')).write_text(tests.test_musicxml.xml_score(tests.test_musicxml.xml_note()))
|
||||
with self.assertRaisesRegex(ValueError, 'conflicting output path') as raised:
|
||||
generator.arrange.generate.generate_performance_scores(source, output, rhythms=tests.rhythm_fixtures.library())
|
||||
generator.arrange.generate.generate_performance_scores(source, output, rhythms=tests.rhythm_fixtures.library(), scales=tests.scale_fixtures.library(), sequences=tests.solo_fixtures.library())
|
||||
for name in names:
|
||||
self.assertIn(str(source / (name + '.xml')), str(raised.exception))
|
||||
self.assertEqual([p.name for p in output.iterdir()], ['sentinel'])
|
||||
def test_pipeline_parses_and_normalizes_each_source_once(self):
|
||||
self.enterContext(unittest.mock.patch('generator.solo.sequences.load_library', return_value=tests.solo_fixtures.library()))
|
||||
self.enterContext(unittest.mock.patch('generator.scales.library.load_library', return_value=tests.scale_fixtures.library()))
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = pathlib.Path(directory)
|
||||
|
||||
Reference in New Issue
Block a user