Skip to content
Snippets Groups Projects
Commit f8fa5ae4 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

enable twisted delayedcall debugging in UTs

parent 374c4d4c
No related branches found
No related tags found
Loading
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import twisted
from twisted.trial import unittest from twisted.trial import unittest
import logging import logging
...@@ -65,6 +65,10 @@ class TestCase(unittest.TestCase): ...@@ -65,6 +65,10 @@ class TestCase(unittest.TestCase):
@around(self) @around(self)
def setUp(orig): def setUp(orig):
# enable debugging of delayed calls - this means that we get a
# traceback when a unit test exits leaving things on the reactor.
twisted.internet.base.DelayedCall.debug = True
old_level = logging.getLogger().level old_level = logging.getLogger().level
if old_level != level: if old_level != level:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment