Skip to content
Snippets Groups Projects
Commit 4fd3df8d authored by inso's avatar inso
Browse files

More logging messages

parent de31170f
No related branches found
No related tags found
No related merge requests found
import sys
import os
import signal
import unittest
import subprocess
import time
......@@ -16,5 +17,14 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
print("Run")
runner = unittest.TextTestRunner().run(unittest.defaultTestLoader.discover(start_dir='cutecoin.tests', pattern='test_*'))
print("Terminate")
p.terminate()
os.kill(p.pid, signal.SIGINT)
time.sleep(2)
try:
os.kill(p.pid, signal.SIGKILL)
p.kill()
print("Hard killed")
except OSError:
print("Terminated gracefully")
sys.exit(not runner.wasSuccessful())
\ No newline at end of file
import sys
import unittest
import os
import asyncio
import quamash
import logging
import time
from PyQt5.QtWidgets import QDialog
from PyQt5.QtCore import QLocale, Qt
from PyQt5.QtTest import QTest
......@@ -17,6 +15,7 @@ from cutecoin.core.app import Application
from cutecoin.core.account import Account
from cutecoin.tests import get_application
class ProcessAddCommunity(unittest.TestCase):
def setUp(self):
self.qapplication = get_application()
......@@ -62,7 +61,8 @@ class ProcessAddCommunity(unittest.TestCase):
QTest.mouseDClick(process_community.spinbox_port, Qt.LeftButton)
process_community.spinbox_port.setValue(50000)
self.assertEqual(process_community.stacked_pages.currentWidget(),
process_community.page_node)
process_community.page_node,
msg="Current widget : {0}".format(process_community.stacked_pages.currentWidget().name()))
self.assertEqual(process_community.lineedit_server.text(), "127.0.0.1")
self.assertEqual(process_community.spinbox_port.value(), 50000)
QTest.mouseClick(process_community.button_register, Qt.LeftButton)
......@@ -80,9 +80,11 @@ class ProcessAddCommunity(unittest.TestCase):
self.assertEqual(mock.get_request(6).method, 'POST')
self.assertEqual(mock.get_request(6).url[:8], '/wot/add')
self.assertEqual(process_community.label_error.text(), "Broadcasting identity...")
yield from asyncio.sleep(1)
self.assertEqual(process_community.stacked_pages.currentWidget(),
process_community.page_add_nodes)
process_community.page_add_nodes,
msg="Current widget : {0}".format(process_community.stacked_pages.currentWidget().name()))
QTest.mouseClick(process_community.button_next, Qt.LeftButton)
asyncio.async(exec_test())
......
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