summary refs log tree commit diff
path: root/tests/unittest.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-10-30 12:08:09 +0000
committerErik Johnston <erik@matrix.org>2020-10-30 12:08:09 +0000
commit1ff3bc332ac5bd7a3c9ac4fcbcbf1692111f33d1 (patch)
tree9abed3402979f5105af3cb7ef739e8646e13f148 /tests/unittest.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentImplement and use an @lru_cache decorator (#8595) (diff)
downloadsynapse-1ff3bc332ac5bd7a3c9ac4fcbcbf1692111f33d1.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'tests/unittest.py')
-rw-r--r--tests/unittest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unittest.py b/tests/unittest.py

index 257f465897..08cf9b10c5 100644 --- a/tests/unittest.py +++ b/tests/unittest.py
@@ -54,7 +54,7 @@ from tests.server import ( render, setup_test_homeserver, ) -from tests.test_utils import event_injection +from tests.test_utils import event_injection, setup_awaitable_errors from tests.test_utils.logging_setup import setup_logging from tests.utils import default_config, setupdb @@ -119,6 +119,10 @@ class TestCase(unittest.TestCase): logging.getLogger().setLevel(level) + # Trial messes with the warnings configuration, thus this has to be + # done in the context of an individual TestCase. + self.addCleanup(setup_awaitable_errors()) + return orig() @around(self)