From 1d6dd1c2944c22147258dda8ccf2777c68b38fba Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 10 Oct 2019 10:53:06 +0100 Subject: [PATCH] Move patch_inline_callbacks into synapse/ --- synapse/__init__.py | 2 +- {tests => synapse/util}/patch_inline_callbacks.py | 2 +- tests/__init__.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename {tests => synapse/util}/patch_inline_callbacks.py (98%) diff --git a/synapse/__init__.py b/synapse/__init__.py index 1055f54e00..bf102244a9 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -20,7 +20,7 @@ import os import sys -from tests.patch_inline_callbacks import do_patch +from synapse.util.patch_inline_callbacks import do_patch # Check that we're not running on an unsupported Python version. if sys.version_info < (3, 5): diff --git a/tests/patch_inline_callbacks.py b/synapse/util/patch_inline_callbacks.py similarity index 98% rename from tests/patch_inline_callbacks.py rename to synapse/util/patch_inline_callbacks.py index a35a1d3305..4fb49b0b2b 100644 --- a/tests/patch_inline_callbacks.py +++ b/synapse/util/patch_inline_callbacks.py @@ -105,7 +105,7 @@ def do_patch(): def _check_yield_points(f, changes, start_context): - """Wraps a generator that is about to passed to defer.inlineCallbacks + """Wraps a generator that is about to be passed to defer.inlineCallbacks checking that after every yield the log contexts are correct. """ diff --git a/tests/__init__.py b/tests/__init__.py index f7fc502f01..ed805db1c2 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -16,9 +16,9 @@ from twisted.trial import util -import tests.patch_inline_callbacks +from synapse.util.patch_inline_callbacks import do_patch # attempt to do the patch before we load any synapse code -tests.patch_inline_callbacks.do_patch() +do_patch() util.DEFAULT_TIMEOUT_DURATION = 20