Exemplo n.º 1
0
    def testPythonSignal(self):
        """Multiple connections to a python signal (short-circuit)"""
        class Dummy(QObject):
            pass

        sender = Dummy()
        receivers = [BasicPySlotCase() for x in range(10)]
        self.run_many(sender, 'foobar', partial(sender.emit, SIGNAL('foobar')),
                      receivers, (0, ))
    def testQProcessFinished(self):
        '''Multiple connections to QProcess.finished(int)'''
        sender = QProcess()
        receivers = [BasicPySlotCase() for x in range(10)]

        def start_proc(*args):
            sender.start(sys.executable, ['-c', '""'])
            sender.waitForFinished()

        self.run_many(sender, 'finished(int)', start_proc, receivers, (0, ))
 def testButtonClick(self):
     """Multiple connections to QPushButton.clicked()"""
     sender = QPushButton('button')
     receivers = [BasicPySlotCase() for x in range(30)]
     self.run_many(sender, 'clicked()', sender.click, receivers)