A test case for core (which will be ran in main thread)

python3android
Dmitri Bogomolov 6 years ago
parent 51df0507e2
commit a3300ba8f1
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

@ -367,7 +367,15 @@ class Main:
time.time() - state.last_api_response >= 30):
self.stop()
elif not state.enableGUI:
from tests import core
test_core_result = core.run()
state.enableGUI = True
self.stop()
sys.exit(
'Core tests failed!'
if test_core_result.errors or test_core_result.failures
else 0
)
def daemonize(self):
grandfatherPid = os.getpid()

@ -0,0 +1,12 @@
import unittest
class TestCore(unittest.TestCase):
"""Test case, which runs from main pybitmessage thread"""
def test_pass(self):
pass
def run():
suite = unittest.TestLoader().loadTestsFromTestCase(TestCore)
return unittest.TextTestRunner(verbosity=2).run(suite)
Loading…
Cancel
Save