| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
In practice, this won't ever happen since the regex wouldn't match
strings with missing parts. However, the function does check it so may
as well test it. It's not necessarily bound to always use inputs from
the regex either I suppose.
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
The original approach of messing with the `attribute_name` didn't work
for reasons I won't discuss here (would require knowledge of patcher
internals). The new approach doesn't use patch.multiple but mimics it by
applying multiple patch decorators to the function. As a consequence,
this can no longer be used as a context manager.
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
It's not possible to test this via asserting the return value of
`on_message` since it never returns anything. Instead, the actual
relevant unit, `find_token_in_message,` should be tested.
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
This gives the caller more flexibility. Sometimes attribute names are
too long or they don't follow a naming scheme accepted by the linter.
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
This helper reduces redundancy/boilerplate by setting default values.
It also has the consequence of shortening the length of the invocation,
which makes it faster to use and easier to read.
|
| | | | | |_|_|/ / / / / /
| | | |/| | | | | | | | |
|
| | | |\ \ \ \ \ \ \ \ \ \
| | | |_|_|_|_|_|_|_|/ /
| | |/| | | | | | | | | |
Use Scheduler instead of asyncio.sleep on silence cog
|
| | | | | |_|/ / / / / /
| | | |/| | | | | | | |
|
| | | |\ \ \ \ \ \ \ \ \
| | | | |_|_|_|_|_|/ /
| | | |/| | | | | | | |
|
| | | | |\ \ \ \ \ \ \ \
| | | | | |_|_|/ / / /
| | | | |/| | | | | | |
|
| | | | | |\ \ \ \ \ \ \
| | | | | | |_|/ / / /
| | | | | |/| | | | | |
|
| | | | | | |\| | | | | |
|
| | | | | | | | | | | | |
|
| | | | | |\ \ \ \ \ \ \
| | | | | | |/ / / / /
| | | | | |/| | | | | |
|
| | | | | | |\ \ \ \ \ \ |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
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 `msg` arg is for displaying a message when the assertion fails. To
match against the exception's message, `assertRaisesRegex` must be used.
Since all of the messages are meant to be interpreted literally rather
than as regex, `re.escape` is used.
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
| | | | |/ / / / / / /
| | |/| | | | | | | |
|
| | |\| | | | | | | | |
|
| | | | | | | | | | | |
|
| | | | | | | | | | | |
|
| | | |_|_|_|_|/ / /
| |/| | | | | | | |
|
| | |_|_|_|_|/ / /
|/| | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|