mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
* Move all fixtures to pytest plugin folder * Add core dunder all * Update other dunder all's * Black reformat
25 lines
512 B
Python
25 lines
512 B
Python
import pytest
|
|
|
|
from redbot.core import data_manager
|
|
|
|
__all__ = ["cleanup_datamanager", "data_mgr_config", "cog_instance"]
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def cleanup_datamanager():
|
|
data_manager.basic_config = None
|
|
data_manager.jsonio = None
|
|
|
|
|
|
@pytest.fixture()
|
|
def data_mgr_config(tmpdir):
|
|
default = data_manager.basic_config_default.copy()
|
|
default["BASE_DIR"] = str(tmpdir)
|
|
return default
|
|
|
|
|
|
@pytest.fixture()
|
|
def cog_instance():
|
|
thing = type("CogTest", (object,), {})
|
|
return thing()
|