| Commit message (Collapse) | Author | Age | Lines |
| |\ |
|
| | |\ |
|
| | | |\ |
|
| | | | | |
|
| | |\ \ \
| | | |/
| | |/| |
|
| | | |\ \ |
|
| | | | |\ \ |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
for embed descriptions
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
test_get_disallowed_extensions
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
extensions and added a test for it.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | | |
Co-authored-by: Mark <[email protected]>
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
meantime.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | | |
Replace `{"foo": "bar"}` with `{"id": 1}`
|
| | | | | | |
| | | | | |
| | | | | | |
To allow `.get`, I had to replace `str` return value with `dict`
|
| | | | | | | |
|
| | | | | | | |
|
| | | |\ \ \ \
| | | | |_|/
| | | |/| | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Remove unnecessary space from placeholder
- Rename `has_active_infraction` to `get_active_infraction`
|
| | | | | | |
| | | | | |
| | | | | | |
Co-authored-by: Leon Sandøy <[email protected]>
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
removed unnecessary type hint and added comment to kick truncation test about awaiting `kick`.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | |_|_|/
| |/| | |
| | | | |
| | | | | |
I wish this test didn't exist.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The bot can get into trouble in three distinct ways:
- It has no Bot instance
- It has no namespace
- It has no parent instance.
These happen only if you're using it wrong. To make the test more
precise, and to add a little bit more readability (RuntimeError could be
anything!), we'll introduce some custom exceptions for these three
states.
This addresses a review comment by @aeros.
|
| | |\ \ \ \ |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This check was no longer being used anywhere, having been replaced by
in_whitelist_check.
|
| | | | | | | |
|
| | | | |/ /
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We're moving the actual predicate into the `utils.checks` folder, just
like we're doing with most of the other decorators. This is to allow us
the flexibility to use it as a pure check, not only as a decorator.
This commit doesn't actually change any functionality, just moves it
around.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Also added a test for this.
This is the DRYest approach I could find. It's a little ugly, but I
think it's probably good enough.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The way we were doing the asyncio.Lock() stuff for increment was
slightly problematic. @aeros has adviced us that it's better to just
initialize the lock as None in __init__, and then initialize it inside
the first coroutine that uses it instead. This ensures that the correct
loop gets attached to the lock, so we don't end up getting errors like
this one:
RuntimeError: got Future <Future pending> attached to a different loop
This happens because the lock and the actual calling coroutines aren't
on the same loop. When creating a new test, test_increment_lock, we
discovered that we needed a small refactor here and also in the test
class to make this new test pass.
So, now we're creating a DummyCog for every test method, and this will
ensure the loop streams never cross. Cause we all know we must never
cross the streams.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This just tests that the various RuntimeErrors are reachable - that
includes the error about not having a bot instance, the one about not
being a class attribute, and the one about not having instantiated the
class.
This test addresses a concern raised by @MarkKoz in a review.
I've decided not to test that actual contents of these RuntimeErrors,
because I believe that sort of testing is a bit too brittle. It
shouldn't break a test just to change the content of an error string.
|
| | | | | | |
|