mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 09:56:05 -05:00
[V3 Everything] Package bot and write setup scripts (#964)
Ya'll are gonna hate me. * Initial modifications * Add initial setup.py * working setup py help * Modify setup file to package stuff * Move a bunch of shit and fix imports * Fix or skip tests * Must add init files for find_packages to work * Move main to scripts folder and rename * Add shebangs * Copy over translation files * WORKING PIP INSTALL * add dependency information * Hardcoded version for now, will need to figure out a better way to do this * OKAY ITS FINALLY FUCKING WORKING * Add this guy * Fix stuff * Change readme to rst * Remove double sentry opt in * Oopsie * Fix this thing * Aaaand fix test * Aaaand fix test * Fix core cog importing and default cog install path * Adjust readme * change instance name from optional to required * Ayyy let's do more dependency injection
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
from collections import namedtuple
|
||||
from raven.versioning import fetch_git_sha
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from cogs.downloader.repo_manager import RepoManager, Repo
|
||||
from pathlib import Path
|
||||
from raven.versioning import fetch_git_sha
|
||||
|
||||
from redbot.cogs.downloader.repo_manager import RepoManager, Repo
|
||||
|
||||
|
||||
async def fake_run(*args, **kwargs):
|
||||
@@ -37,8 +38,6 @@ def repo_manager(tmpdir_factory, config):
|
||||
|
||||
@pytest.fixture
|
||||
def repo(tmpdir):
|
||||
from cogs.downloader.repo_manager import Repo
|
||||
|
||||
repo_folder = Path(str(tmpdir)) / 'repos' / 'squid'
|
||||
repo_folder.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
@@ -69,8 +68,6 @@ def bot_repo(event_loop):
|
||||
|
||||
|
||||
def test_existing_git_repo(tmpdir):
|
||||
from cogs.downloader.repo_manager import Repo
|
||||
|
||||
repo_folder = Path(str(tmpdir)) / 'repos' / 'squid' / '.git'
|
||||
repo_folder.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
@@ -103,7 +100,7 @@ async def test_clone_repo(repo_norun, capsys):
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_add_repo(monkeypatch, repo_manager):
|
||||
monkeypatch.setattr("cogs.downloader.repo_manager.Repo._run",
|
||||
monkeypatch.setattr("redbot.cogs.downloader.repo_manager.Repo._run",
|
||||
fake_run_noprint)
|
||||
|
||||
squid = await repo_manager.add_repo(
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import pytest
|
||||
import json
|
||||
|
||||
from cogs.downloader.installable import Installable, InstallableType
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from redbot.cogs.downloader.installable import Installable, InstallableType
|
||||
|
||||
INFO_JSON = {
|
||||
"author": (
|
||||
"tekulvw",
|
||||
|
||||
Reference in New Issue
Block a user