mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[Downloader] Install SHARED_LIBRARY requirements (#2384)
SHARED_LIBRARY Installable types did not have the requirements as defined in info.json automatically installed. This change updates the installation of libraries to also install their requirements. Resolves #2381
This commit is contained in:
@@ -38,6 +38,22 @@ async def test_add_repo(monkeypatch, repo_manager):
|
||||
assert squid.available_modules == []
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_lib_install_requirements(monkeypatch, library_installable, repo, tmpdir):
|
||||
monkeypatch.setattr("redbot.cogs.downloader.repo_manager.Repo._run", fake_run_noprint)
|
||||
monkeypatch.setattr(
|
||||
"redbot.cogs.downloader.repo_manager.Repo.available_libraries", (library_installable,)
|
||||
)
|
||||
|
||||
lib_path = Path(str(tmpdir)) / "cog_data_path" / "lib"
|
||||
sharedlib_path = lib_path / "cog_shared"
|
||||
sharedlib_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
result = await repo.install_libraries(target_dir=sharedlib_path, req_target_dir=lib_path)
|
||||
|
||||
assert result is True
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_remove_repo(monkeypatch, repo_manager):
|
||||
monkeypatch.setattr("redbot.cogs.downloader.repo_manager.Repo._run", fake_run_noprint)
|
||||
|
||||
Reference in New Issue
Block a user