fix: make cupy installation opt-in

This commit is contained in:
2026-08-15 22:04:53 +02:00
parent 897e343268
commit 2ee1c6f4cf
3 changed files with 32 additions and 37 deletions
+19
View File
@@ -0,0 +1,19 @@
import os
import subprocess
import sys
import install as tween_install
def test_installer_never_installs_optional_cupy(monkeypatch):
calls = []
monkeypatch.setattr(subprocess, "check_call", calls.append)
tween_install.install()
requirements_path = os.path.join(
os.path.dirname(tween_install.__file__), "requirements.txt"
)
assert calls == [[
sys.executable, "-m", "pip", "install", "-r", requirements_path
]]