Exemplo n.º 1
0
    def generate_stages(self):
        stages = []
        for stage_func in plugins.early_import_stages():
            stages.append(plugin_stage(self, stage_func))
        for stage_func in plugins.import_stages():
            stages.append(plugin_stage(self, stage_func))

        stages.append(manipulate_files(self))
        return stages
Exemplo n.º 2
0
    def test_apply_tracks_uses_singleton_path(self):
        apply_coro = importer.apply_choices(self.session)
        apply_coro.next()
        manip_coro = importer.manipulate_files(self.session)
        manip_coro.next()

        task = importer.ImportTask.item_task(self.i)
        task.set_choice(TrackMatch(0, self.info.tracks[0]))
        apply_coro.send(task)
        manip_coro.send(task)

        self.assertExists(os.path.join(self.libdir, 'three.mp3'))
Exemplo n.º 3
0
    def test_apply_tracks_uses_singleton_path(self):
        config = _common.iconfig(self.lib)
        apply_coro = importer.apply_choices(config)
        apply_coro.next()
        manip_coro = importer.manipulate_files(config)
        manip_coro.next()

        task = importer.ImportTask.item_task(self.i)
        task.set_choice(TrackMatch(0, self.info.tracks[0]))
        apply_coro.send(task)
        manip_coro.send(task)

        self.assertExists(os.path.join(self.libdir, "three.mp3"))