PyBitmessage-2021-04-27/src/bitmessageqt/tests/main.py
Dmitri Bogomolov d6953eb450
New package: bitmessageqt.tests
any test cases from it will be added to tests.core test suite if possible,
e.g. PyQt is functional. TestSupport - minimal test case for support module
to reproduce #1633.
2020-06-15 12:06:31 +03:00

31 lines
695 B
Python

"""Common definitions for bitmessageqt tests"""
import unittest
from PyQt4 import QtCore, QtGui
import bitmessageqt
from tr import _translate
class TestBase(unittest.TestCase):
"""Base class for bitmessageqt test case"""
def setUp(self):
self.app = QtGui.QApplication([])
self.window = bitmessageqt.MyForm()
def tearDown(self):
self.app.deleteLater()
class TestMain(unittest.TestCase):
"""Test case for main window - basic features"""
def test_translate(self):
"""Check the results of _translate() with various args"""
self.assertIsInstance(
_translate("MainWindow", "Test"),
QtCore.QString
)