Example #1
0
class TestQDialogWithDpi:
    ''' The test class that helps do the unit test for QDialogWithDpi '''

    @classmethod
    def setup_class(cls):
        ''' Initializes a QtGui.QApplication '''
        cls.app = QApplication([])

    @classmethod
    def teardown_class(cls):
        ''' Destruct the QtGui.QApplication '''
        cls.app.deleteLater()

    def setup(self):
        ''' Construct a tested class '''
        self.tested_cls = QDialogWithDpi()

    def test_resize(self):
        self.tested_cls.resize(400, 400)
        assert self.tested_cls.size() == QSize(round(400 * 1.5), round(400 * 1.25))
Example #2
0
 def setup(self):
     ''' Construct a tested class '''
     self.tested_cls = QDialogWithDpi()