mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 17:32:31 -05:00
Add redbot.core.app_commands namespace (#6006)
This commit is contained in:
23
tests/core/test_app_commands.py
Normal file
23
tests/core/test_app_commands.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import inspect
|
||||
|
||||
import pytest
|
||||
from discord import app_commands as dpy_app_commands
|
||||
|
||||
from redbot.core import app_commands
|
||||
|
||||
|
||||
def test_dpy_app_commands_reexports():
|
||||
dpy_attrs = set()
|
||||
for attr_name, attr_value in dpy_app_commands.__dict__.items():
|
||||
if attr_name.startswith("_") or inspect.ismodule(attr_value):
|
||||
continue
|
||||
|
||||
dpy_attrs.add(attr_name)
|
||||
|
||||
missing_attrs = dpy_attrs - set(app_commands.__dict__.keys())
|
||||
|
||||
if missing_attrs:
|
||||
pytest.fail(
|
||||
"redbot.core.app_commands is missing these names from discord.app_commands: "
|
||||
+ ", ".join(missing_attrs)
|
||||
)
|
||||
Reference in New Issue
Block a user