Unify separation tools and add exclusive control mode
This commit is contained in:
@@ -56,3 +56,16 @@ class VideoComfyTests(unittest.TestCase):
|
||||
self.video.switch('llm');self.video.thread.join(2);self.assertEqual(scheduler.gpu_mode,'llm')
|
||||
def test_music_requires_enabled_ready_profile(self):
|
||||
with self.assertRaisesRegex(ValueError,'Musikprofil'):self.video.switch('music')
|
||||
|
||||
def test_separator_switch_drains_owned_workers_without_starting_video(self):
|
||||
import threading
|
||||
from types import SimpleNamespace
|
||||
self.video.scheduler=SimpleNamespace(gpu_mode='llm',cv=threading.Condition(),active=0,tts_active=0,transition=False,key=('chat',))
|
||||
self.video._stop=Mock();self.video._start=Mock();self.video._foreign_services=lambda:[]
|
||||
self.video.separator_status=lambda:dict(installed=True,models=[dict(installed=True)])
|
||||
self.video.switch('separator');self.video.thread.join(2)
|
||||
self.assertEqual(self.video.scheduler.gpu_mode,'separator');self.video._start.assert_not_called();self.video.stop_owned.assert_called_once()
|
||||
self.video.switch('llm');self.video.thread.join(2);self.assertEqual(self.video.scheduler.gpu_mode,'llm')
|
||||
def test_separator_requires_ready_model(self):
|
||||
self.video.separator_status=lambda:dict(installed=False,models=[])
|
||||
with self.assertRaisesRegex(ValueError,'Audio-Separator'):self.video.switch('separator')
|
||||
|
||||
Reference in New Issue
Block a user