Skip to content

Commit

Permalink
Integration of unittest with graphical test
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshyacis committed Feb 26, 2020
1 parent 4d37958 commit b97aa29
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 375 deletions.
11 changes: 10 additions & 1 deletion src/bitmessageqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,11 @@ def click_actionJoinChan(self):

def showConnectDialog(self):
dialog = dialogs.ConnectDialog(self)
if state.qttesting:
import qttest
from PyQt4 import QtCore, QtGui
qttest.connectme(dialog)
QtCore.QTimer.singleShot(0, dialog.buttonBox.button(QtGui.QDialogButtonBox.Ok).clicked)
if dialog.exec_():
if dialog.radioButtonConnectNow.isChecked():
BMConfigParser().remove_option(
Expand Down Expand Up @@ -4176,6 +4181,10 @@ def run():
myapp.show()

if state.qttesting:
qttest.Testing(myapp)
import unittest
import qttest
suite = unittest.TestSuite()
suite.addTest(qttest.BitmessageTestCase.bitmessage_testloader(qttest.BitmessageTest, myapp = myapp))
unittest.TextTestRunner().run(suite)

sys.exit(app.exec_())
Loading

0 comments on commit b97aa29

Please sign in to comment.