コード例 #1
0
ファイル: test_gel.py プロジェクト: PlumpMath/pygel
    def test_factory_use_qt5_reactor(self):
        from gel.reactor.qt5_reactor import Qt5Reactor
        from PyQt5.QtCore import QCoreApplication

        # we need an qt application in orther to use a qt reactor
        app = QCoreApplication(sys.argv)

        gel = Gel.from_reactor(event_loop='qt5')
        self.assertIsInstance(gel._reactor, Qt5Reactor)

        gel = Gel.from_reactor(event_loop='pyqt5')
        self.assertIsInstance(gel._reactor, Qt5Reactor)

        gel = Gel.from_reactor(event_loop='qt')
        self.assertIsInstance(gel._reactor, Qt5Reactor)
コード例 #2
0
ファイル: test_gel.py プロジェクト: caetanus/pygel
    def test_factory_use_qt5_reactor(self):
        from gel.reactor.qt5_reactor import Qt5Reactor
        from PyQt5.QtCore import QCoreApplication

        # we need an qt application in orther to use a qt reactor
        app = QCoreApplication(sys.argv)

        gel = Gel.from_reactor(event_loop='qt5')
        self.assertIsInstance(gel._reactor, Qt5Reactor)

        gel = Gel.from_reactor(event_loop='pyqt5')
        self.assertIsInstance(gel._reactor, Qt5Reactor)

        gel = Gel.from_reactor(event_loop='qt')
        self.assertIsInstance(gel._reactor, Qt5Reactor)
コード例 #3
0
ファイル: test_gel.py プロジェクト: PlumpMath/pygel
 def test_factory_with_no_arguments_should_use_gel_reactor(self):
     from gel.reactor.gel_reactor import GelReactor
     gel = Gel.from_reactor()
     self.assertIsInstance(gel._reactor, GelReactor)
コード例 #4
0
ファイル: test_gel.py プロジェクト: caetanus/pygel
 def test_factory_with_no_arguments_should_use_gel_reactor(self):
     from gel.reactor.gel_reactor import GelReactor
     gel = Gel.from_reactor()
     self.assertIsInstance(gel._reactor, GelReactor)