aboutsummaryrefslogtreecommitdiffstats
path: root/tests/README.md
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2021-04-28 15:46:21 +0800
committerGravatar kosayoda <[email protected]>2021-04-28 15:46:21 +0800
commit7cf941b82f6f238681af1d55215497c246f82b96 (patch)
treec86e0d84d17da4e3014b4878794c4f20f48f8c83 /tests/README.md
parentUpdate error handler tests to match with recent changes (diff)
parentMerge pull request #1538 from RohanJnr/suspend_stream (diff)
Merge branch 'main' into error-handler-test
Diffstat (limited to 'tests/README.md')
-rw-r--r--tests/README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/README.md b/tests/README.md
index 4f62edd68..092324123 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -114,7 +114,7 @@ class BotCogTests(unittest.TestCase):
### Mocking coroutines
-By default, the `unittest.mock.Mock` and `unittest.mock.MagicMock` classes cannot mock coroutines, since the `__call__` method they provide is synchronous. In anticipation of the `AsyncMock` that will be [introduced in Python 3.8](https://docs.python.org/3.9/whatsnew/3.8.html#unittest), we have added an `AsyncMock` helper to [`helpers.py`](/tests/helpers.py). Do note that this drop-in replacement only implements an asynchronous `__call__` method, not the additional assertions that will come with the new `AsyncMock` type in Python 3.8.
+By default, the `unittest.mock.Mock` and `unittest.mock.MagicMock` classes cannot mock coroutines, since the `__call__` method they provide is synchronous. The [`AsyncMock`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.AsyncMock) that has been [introduced in Python 3.8](https://docs.python.org/3.9/whatsnew/3.8.html#unittest) is an asynchronous version of `MagicMock` that can be used anywhere a coroutine is expected.
### Special mocks for some `discord.py` types