mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-17 02:05:22 -04:00
fix(image): patch realesrgan torchvision compatibility (#4110)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user