fix(image): patch realesrgan torchvision compatibility (#4110)

This commit is contained in:
Dividesbyzer0
2026-06-15 02:16:41 -04:00
committed by GitHub
parent 5e0cdb6cbb
commit 589fcd314a
5 changed files with 111 additions and 2 deletions
+21
View File
@@ -13,6 +13,7 @@ import pytest
from routes.shell_routes import (
_find_line_break,
_import_optional_dependency_for_status,
_running_in_container,
_docker_row_status,
_package_installed_from_probe,
@@ -376,6 +377,26 @@ class TestPackageProbeStatus:
assert "add_user_install_bins_to_path()" in script
assert "shutil.which(b)" in script
def test_status_import_prepares_optional_dependency(self, monkeypatch):
import routes.shell_routes as shell_routes
calls = []
monkeypatch.setattr(
shell_routes,
"prepare_optional_dependency_import",
lambda name: calls.append(name),
)
monkeypatch.setattr(
shell_routes.importlib,
"import_module",
lambda name: SimpleNamespace(__name__=name),
)
module = _import_optional_dependency_for_status("realesrgan")
assert module.__name__ == "realesrgan"
assert calls == ["realesrgan"]
class TestSshBaseArgv:
def test_basic_host_no_port(self):