Closed Diapolo10 closed 1 year ago
It seems to be caused by discord.py
v2.2 supporting member flags (https://github.com/Rapptz/discord.py/commit/c46f309c13948cd72adfd3023ee38652f80eedf3) and dpytest is not yet updated to support that version.
I fixed it for the time being by doing monkey-patching in conftest.py
:
from discord.ext.test import factories
old_member_dict = factories.make_member_dict
def new_make_member_dict(*args, **kwargs):
res = old_member_dict(*args, **kwargs)
res["flags"] = 0
return res
factories.make_member_dict = new_make_member_dict
yup, it's because of discord.py 2.2.0 (that's why it's better to specify the version, in you requirements.txt, you wouldn't have that issue if you used discord.py==2.1.1)
Anyway, I allready made a branch to fix that. Thanks to @null2264 by the way, you really pinpoint me in the right spot, so It was piece of cake.
Closing.
(solution is : either you explicitely test with discord.py==2.1.1 or you wait till I released the version with the fix for 2.2.0)
Okay, I'll make the version requirements more strict in the meantime. Thanks!
I can run all of my tests locally perfectly fine, all tests passing, so I was rather surprised when I suddenly got a barrage of emails when I pushed my code through routine GitHub Actions checks to be merged.
I can only assume that there's some kind of an incompatibility going on here. Whether this is something
dpytest
is supposed to support or ignore is not something I would know, but seeing as how useful/important automated testing is I would say it's at least worth considering.Here's the error from one of my tests, the rest are virtually identical:
The tests failed on both Windows and Linux, so I don't think this is related to the operating system. The failed actions can be seen here: https://github.com/Diapolo10/clan-quest-osrs-discord-bot/actions/runs/4298768145