From 3251138211c222bad1d83556a94a17e459b3262f Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Mon, 26 Oct 2020 14:23:19 +0200 Subject: [PATCH] Try failing in core tests setUp() --- src/tests/core.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tests/core.py b/src/tests/core.py index 90dd656c..234ae987 100644 --- a/src/tests/core.py +++ b/src/tests/core.py @@ -57,6 +57,16 @@ def cleanup(): class TestCore(unittest.TestCase): """Test case, which runs in main pybitmessage thread""" + def setUp(self): + """Check exceptions before starting""" + while True: + try: + thread, exc = excQueue.get(block=False) + except Queue.Empty: + return + if thread == 'tests': + self.fail('Exception in the main thread: %s' % exc) + def test_msgcoding(self): """test encoding and decoding (originally from helper_msgcoding)""" msg_data = {