Skip to content

Commit 5fb2bed

Browse files
committed
Add pytest fixture that doesn't call configure()
1 parent 760d7a7 commit 5fb2bed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ async def bot(event_loop):
2828
dpytest.configure(b)
2929
return b
3030

31+
@pytest.fixture(autouse=False)
32+
async def bot_no_configure(event_loop):
33+
"""
34+
The bot conftest method but with no dpytest.configure() method call
35+
"""
36+
intents = discord.Intents.default()
37+
intents.members = True
38+
intents.guilds = True
39+
intents.messages = True
40+
b = commands.Bot(KoalaBot.COMMAND_PREFIX, loop=event_loop, intents=intents)
41+
await dpytest.empty_queue()
42+
return b
3143

3244
@pytest.fixture(autouse=True)
3345
def setup_is_dpytest():

0 commit comments

Comments
 (0)