ModelTranslator: --rizom 显式路径独占生效——无效直接报错不回落默认安装
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
b702685e36
commit
455ab48273
@@ -29,6 +29,12 @@ class TestFindRizomuv(unittest.TestCase):
|
||||
ru.find_rizomuv("Z:/no/such/rizomuv.exe", use_registry=False,
|
||||
default="Z:/no/default.exe")
|
||||
|
||||
def test_explicit_cli_path_is_exclusive(self):
|
||||
# 显式指定的路径不存在必须直接抛错,不得回落默认安装
|
||||
with self.assertRaises(ru.RizomError) as cm:
|
||||
ru.find_rizomuv("Z:/explicit/bad.exe")
|
||||
self.assertIn("Z:/explicit/bad.exe", str(cm.exception))
|
||||
|
||||
def test_registry_value_is_real_exe_if_present(self):
|
||||
p = ru.registry_rizom_path()
|
||||
if p is None:
|
||||
|
||||
Reference in New Issue
Block a user