A valid DLSS_SDK must not block the Vulkan header auto-download, and vice versa; assert that only the missing component is fetched. Co-Authored-By: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
@@ -378,6 +378,16 @@ class DlssBuildPlanTests(unittest.TestCase):
|
||||
self.assertEqual(plan["env"], env)
|
||||
self.assertEqual(plan["sdk"], self.sdk)
|
||||
|
||||
def test_explicit_sdk_env_still_allows_vulkan_autodownload(self):
|
||||
env = {"DLSS_SDK": str(self.sdk)}
|
||||
with patch.object(airdef, "install_dlss_sdk", side_effect=AssertionError("download attempted")), \
|
||||
patch.object(airdef, "cached_vulkan_headers", return_value=None), \
|
||||
patch.object(airdef, "install_vulkan_headers", return_value=self.vulkan) as vulkan_install:
|
||||
plan, _ = self.plan(env=env, system="Windows", gpus=["NVIDIA GeForce RTX 3060"])
|
||||
vulkan_install.assert_called_once_with()
|
||||
self.assertEqual(plan["features"], "mods,dlss")
|
||||
self.assertEqual(plan["env"], {"DLSS_SDK": str(self.sdk), "VULKAN_SDK": str(self.vulkan)})
|
||||
|
||||
def test_explicit_but_invalid_env_does_not_silently_download(self):
|
||||
env = {"DLSS_SDK": str(self.root / "missing"), "VULKAN_SDK": str(self.vulkan)}
|
||||
with patch.object(airdef, "install_dlss_sdk", side_effect=AssertionError("download attempted")):
|
||||
|
||||
Reference in New Issue
Block a user